Opened 20 years ago

Last modified 17 years ago

#2684 new enhancement

RFE: add version glob handling to port clean --dist

Reported by: rshaw@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts Future
Component: base Version:
Keywords: Cc: jmpalacios (Juan Manuel Palacios)
Port:

Description (last modified by jmpalacios (Juan Manuel Palacios))

Hi Robert! Just wanted to make a short suggestion/request. Would it be possible to include the ability to provide either an exact version or a glob pattern to other than the '--archive' switch of the clean target? I just attempted an update of my installed ports and found myself still doing a lot of manual cleaning, specially with distfiles. Here's why I ask:

$[juan@PowerBook: juan](25/0,1)-> ls /opt/local/var/db/dports/distfiles/adium/
total 28768
-rw-r--r--  1 root  admin       6M 25 Jan 00:24 AdiumX_Source_0.75.1.tar.gz
-rw-r--r--  1 root  admin       7M 31 Jan 23:48 AdiumX_Source_0.76.tar.gz

$[juan@PowerBook: juan](26/0,1)-> sudo port -d clean --dist adium 0.75.1
DEBUG: Found port in file:///usr/local/OpenDarwin/darwinports/dports/aqua/adium
DEBUG: Changing to port directory: /usr/local/OpenDarwin/darwinports/dports/aqua/adium
DEBUG: Requested variant powerpc is not provided by port adium.
DEBUG: Requested variant darwin is not provided by port adium.
DEBUG: Skipping com.apple.main (adium) since this port is already installed
--->  Cleaning adium
DEBUG: Executing com.apple.clean (adium)
--->  Removing distfiles for adium
DEBUG: Removing file: /opt/local/var/db/dports/distfiles/adium/AdiumX_Source_0.76.tar.gz
1 distfile(s) removed.
DEBUG: Removing directory: /opt/local/var/db/dports/distfiles/adium
1 distfile directory(s) removed.

$[juan@PowerBook: juan](27/0,1)-> ls /opt/local/var/db/dports/distfiles/adium/
ls: /opt/local/var/db/dports/distfiles/adium/: No such file or directory

I tried to remove *only* the 0.75.1 Adium distfile in a similar fashion as I would have done with the archives, but instead all of them were nuked in one go along with distfiles/adium dir. Can this be improved?

Regards,...

Juan

Change History (6)

comment:1 Changed 20 years ago by rshaw@…

Status: newassigned

comment:2 Changed 20 years ago by rshaw@…

Hey Robert, thank you for the hard work! I was thinking a bit more about this and came to realize

that version numbers and/or glob patterns (do we allow things like revisions and variants here?) only make sense on the distfiles and the archives, so why not extend this feature to the --all switch as well (ignoring it, of course, when --all takes care of the work dir)? Thus we would be able to 'port clean -- dist foo 1.2' and/or 'port clean --archive foo 1.2' or simply 'port clean --all foo 1.2' to only take care of distfiles and/or archives relative to the 1.2 release of 'foo'.

How does that sound? (Geee, I really gotta shape up on TCL to start coding some of these ideas

myself!). Regards,...

Juan

comment:3 Changed 20 years ago by rshaw@…

severity: normalenhancement

comment:4 Changed 19 years ago by rshaw@…

Owner: changed from rshaw@… to darwinports-bugs@…
Status: assignednew

No longer maintaining these ports.

comment:5 Changed 17 years ago by nox@…

Cc: jmpp@… added; jmpp@… removed
Milestone: MacPorts base enhancements
Priority: ExpectedNormal
Summary: add version glob handling to port clean --distRFE: add version glob handling to port clean --dist
Version: 1.0

comment:6 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Description: modified (diff)
Note: See TracTickets for help on using tickets.