Files disappearing from distfiles mirror

Ryan Schmidt ryandesign at macports.org
Mon Mar 2 00:40:35 PST 2009


On Mar 1, 2009, at 04:27, Joshua Root wrote:

> Ryan Schmidt wrote:
>
>> But I would like to know how it came to be that the file was on  
>> all of
>> our mirrors in October 2008 but then disappeared from two of them  
>> since
>> then.
>
> Portmirror deletes files when the checksums don't match.

Hmm. Well on the one hand that's a good thing: if someone commits a  
port update, and the distfiles mirror fetches the distfile, and the  
checksums don't match what's in the port, it's good that this file  
doesn't end up on the mirror. It would be great if the committer  
could be informed of this checksum mismatch but that's another matter.

But on the other hand it's a bad thing: if someone discovers that an  
upstream stealth update has occurred and updates the port but does so  
by only changing the checksums (which is what we don't want  
maintainers to do), then several bad things happen:

1) Anyone who has the old distfiles with the old checksums on their  
hard drive already and tries to reinstall the port will now get a  
checksum error (this is why we don't want maintainers to only update  
the checksums but leave the distfile in the same place; instead  
maintainers should make sure the dist_subdir changes).
2) The distfiles mirror will -- do what? I don't know. It will either  
leave the old distfile in place, causing checksum errors for anyone  
downloading the new file, or it will delete the old distfile and  
download the new distfile, causing checksum errors for anyone who  
hasn't "port sync"'d yet, and it's also bad for anyone wanting to  
research what actually changed in the stealth upgrade because we've  
now nuked the only copy of that file that still existed.

I would like for the distfiles mirrors to never delete older files. I  
think that was the original intent. How could we guarantee this I  
wonder? It would be nice if "portmirror" could get the new files into  
a temporary directory and then we could copy those into the real  
distfiles directory afterward, instead of letting portmirror loose on  
the real distfiles directory where it might possibly delete something  
irreplaceable.



More information about the macports-dev mailing list