Ticket #19940 (new defect)
"port clean --dist" doesn't work correctly with variants
|Reported by:||vinc17@…||Owned by:||macports-tickets@…|
When using a variant, "port clean --dist" doesn't work correctly. For instance:
$ sudo port clean -f --all zsh-devel ---> Cleaning zsh-devel $ sudo port fetch zsh-devel +doc ---> Fetching zsh-devel ---> Attempting to fetch zsh-4.3.10.tar.bz2 from http://kent.dl.sourceforge.net/zsh ---> Attempting to fetch zsh-4.3.10-doc.tar.bz2 from http://kent.dl.sourceforge.net/zsh $ ls /opt/local/var/macports/distfiles/zsh zsh-4.3.10-doc.tar.bz2 zsh-4.3.10.tar.bz2 $ sudo port clean --dist zsh-devel ---> Cleaning zsh-devel Warning: Distfiles directory '/opt/local/var/macports/distfiles/zsh' may contain distfiles needed for other ports, use the -f flag to force removal $ ls /opt/local/var/macports/distfiles/zsh zsh-4.3.10-doc.tar.bz2 $ sudo port clean --dist zsh-devel +doc ---> Cleaning zsh-devel $ ls /opt/local/var/macports/distfiles/zsh ls: cannot access /opt/local/var/macports/distfiles/zsh: No such file or directory
So, "port clean" should remember the variant, just like "port upgrade" (so that it works just before a "port upgrade", in case the dist files have been modified). Moreover the -f option mentioned above is not properly documented in the port(1) man page.