Opened 15 years ago
Last modified 15 years ago
#19940 new defect
"port clean --dist" doesn't work correctly with variants
Reported by: | vinc17@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts Future |
Component: | base | Version: | 1.7.1 |
Keywords: | Cc: | nox@… | |
Port: |
Description
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.
Change History (9)
comment:1 Changed 15 years ago by vinc17@…
comment:2 follow-up: 7 Changed 15 years ago by nox@…
As said in the warning, you don't need to use any variant with clean, see my comment on the other ticket.
comment:6 Changed 15 years ago by blb@…
Milestone: | → MacPorts Future |
---|
One problem with remembering the variant would be when the port is uninstalled, after that the clean wouldn't know what that list was.
comment:7 Changed 15 years ago by vinc17@…
Replying to nox@…:
As said in the warning, you don't need to use any variant with clean, see my comment on the other ticket.
The -f option should never be necessary. This is just a workaround, and things should work without it.
BTW, why not removing the whole subdir unconditionally by default? Files from other ports could be removed too, but with the current behavior, this can already happen (e.g. if two ports share a same file), and files can be refetched anyway.
comment:8 Changed 15 years ago by blb@…
I think one of the biggest issues with removing all of dist_subdir would be for script language modules, eg py26-mpmath; if you remove its whole dist_subdir, you get every python module's distfile (they all go into python/, p5-* into perl5/, and possibly others).
comment:9 Changed 15 years ago by vinc17@…
OK, so, perhaps the subdir should contain some catalog that would list each file that has been downloaded and by which port.
Also note that the warning message is misleading and that using the variant with "port clean" is not documented (and shouldn't be necessary anyway).