Opened 7 years ago

Closed 6 years ago

#53857 closed defect (fixed)

port -N reclaim does not remove any ports

Reported by: raimue (Rainer Müller) Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone: MacPorts 2.5.0
Component: base Version:
Keywords: Cc: rbanffy (Ricardo Bánffy)
Port:

Description (last modified by raimue (Rainer Müller))

When reclaim is started in non-interactive mode with sudo port -N reclaim, the command will check for "unnecessary unrequested ports", but will not remove any of them.

$ sudo port -N reclaim
--->  Checking for unnecessary unrequested ports
Found unrequested ports without requested dependents: qt5-qt3d, grep, grep, gmake, py27-sphinx, py27-sphinx, [...]
--->  Checking for inactive ports
--->  Building list of distfiles still in use
--->  Searching for unused distfiles
--->  Scanning binaries for linking errors
--->  No broken files found.

I expected the command to remove all listed ports without asking me for confirmation, similar to the behavior of commands like port -N install that assume 'yes' as answer in non-interactive mode.

Change History (7)

comment:1 Changed 7 years ago by raimue (Rainer Müller)

Description: modified (diff)

comment:2 Changed 7 years ago by mf2k (Frank Schima)

I think the issue is that "yes" is not a valid answer for it. I see this:

Enter option(s) [1-82/all]: 

So it should say "all" in this case.

comment:3 Changed 7 years ago by raimue (Rainer Müller)

You are right, this is a 'multichoice' as it is called internally. What I meant is that the command should continue as if the user chose to remove all of the ports.

comment:4 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: rbanffy added

Has duplicate #55698.

comment:5 Changed 6 years ago by raimue (Rainer Müller)

Milestone: MacPorts 2.5.0
Owner: set to g5pw
Status: newassigned

The default for port -N reclaim should be to just delete everything, while one could still use port -N -y reclaim (dry-run) to see what it would do.

comment:6 Changed 6 years ago by raimue (Rainer Müller)

comment:7 Changed 6 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: assignedclosed

In 08d0a695cae3f69740bb99d48e6a78772128dc50/macports-base:

reclaim: Respect -N and -y flags

Do not ask questions in non-interactive mode (-N), but still run all the
checks and remove ports and files by default. Do not delete any files in
dry-run mode (-y), even if the user confirmed the removal.

Closes: #53857

Note: See TracTickets for help on using tickets.