Distributions remaining
Ryan Schmidt
ryandesign at macports.org
Thu Jan 9 11:01:43 PST 2014
On Jan 9, 2014, at 12:11, Jeremy Lavergne wrote:
> On Jan 9, 2014, at 12:54, Ryan Schmidt wrote:
>
>>> port mirror --new some_installed_port && port mirror installed && portmirror
>>
>> Hmm, so what different things do these three commands do?
>
> Database being this by default:
> /opt/local/var/macports/distfiles_mirror.db
>
> port mirror
> Create/update a local mirror of distfiles used for ports given on the
> command line. The filemap database can be reset by using the --new
> option (though if no database is found, it will be created automati-
> cally). If the fetched file does not match the checksum given in the
> Portfile, it is deleted. This can be used with pseudo-portnames, eg,
> all, to mirror everything. Note that if you use all, you'll most likely
> want to use -p so port doesn't quit on the first download failure.
Right, I did read that, but it was not clear what each of the three proposed commands does.
I’ve now re-read the ticket and tried the commands out for myself. What I can glean is:
“port mirror” fetches the specified port’s distfiles, if absent, checksums them, and if the checksums don’t match, deletes them again, otherwise it keeps them.
It records information about the distfiles in a database.
The database can be erased by using the --new flag.
There is a MacPorts base bug or misfeature (#21787) which means you should only specify a single port name when using the --new flag, hence the workaround.
So the first two commands are designed to clear the database and populate it with information about currently-installed ports only.
The third command, “portmirror,” seems to delete distfiles that are on disk but not mentioned in the database. Strange name for the script if so. Maybe “portmirror” does other things as well? I’m not sure; I can’t find a manpage or help message.
*
My housekeeping script is supposed to clean up: reclaim disk space used by unwanted distfiles. However, using this “port mirror” approach might re-fetch distfiles that you had already manually deleted.
It also looks like this approach would delete current distfiles of ports that are not currently installed. I would prefer to keep current distfiles, even if the port is not currently installed.
And although “portmirror” deleted a few files successfully, it failed one it got to the “m”s:
Cannot read directory
while executing
"readdir $root"
(procedure "iterate_distfiles_r" line 2)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
"iterate_distfiles_r $func $pathToItem"
(procedure "iterate_distfiles_r" line 5)
invoked from within
[snip]
I don’t know what that’s all about.
More information about the macports-users
mailing list