Opened 16 years ago
Closed 16 years ago
#19253 closed defect (fixed)
port clean aborts with error if port has been removed from collection but is installed
Reported by: | febeling@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.8.0 |
Component: | base | Version: | 1.7.1 |
Keywords: | clean obsolete | Cc: | ryandesign (Ryan Carsten Schmidt), raimue (Rainer Müller), jmroot (Joshua Root) |
Port: |
Description
I came across this behaviour just now with the gail port, which has been removed in r40675 a while back.
This is the error output:
Error: Port gail not found
The user needs a little indication about what the situation is about and how to get around this. In this case for example the user needs to run upgrade on the dependents of gail and the uninstall it.
(And that does currently not work because of an image conflict of the new gtk2 with said gail port, because of these exact files.)
Change History (7)
comment:1 Changed 16 years ago by febeling@…
comment:2 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|---|
Milestone: | Port Bugs → MacPorts Future |
I don't think base ever expects a port definition to be removed. They do get removed on occasion, either because they're being renamed (render -> xorg-renderproto, r44924), or because their functionality has been rolled into another port (gail -> gtk2, r40675), or because the software is no longer available or no longer useful (arts, r49436).
comment:3 follow-up: 4 Changed 16 years ago by raimue (Rainer Müller)
Cc: | raimue@… added |
---|---|
Keywords: | upgrade obsolete added |
Removing ports on upgrade could be bad as we also allow installation of ports not in the PortIndex by using the current
pseudo-port or -D portdir
.
Also, it is not clear to me how you got this error message. I can't think of a way how that could happen with the recommended port upgrade outdated
as a removed port is never in the outdated set, so I assume you used port upgrade installed
as gail is still in the installed set?
port upgrade gail
could maybe get a smarter error message. But in general it is the expected behavior. You asked to upgrade a port which cannot be found in the PortIndex, so there is no way to check the versions.
comment:4 Changed 16 years ago by febeling@…
Replying to raimue@…:
Removing ports on upgrade could be bad as we also allow installation of ports not in the PortIndex by using the
current
pseudo-port or-D portdir
.
good point. So then ignoring them is in fact the right behaviour.
I can't think of a way how that could happen with the recommended
port upgrade outdated
as a removed port is never in the outdated set, so I assume you usedport upgrade installed
as gail is still in the installed set?
But that's what I did, actually, port upgrade outdated. And I was just assuming that this was not properly handled. I will run a test and report later. I had the same exact behaviour later with render, which was removed/renamed as well, so I was quite confident that this was always the case with removed ports.
comment:5 Changed 16 years ago by febeling@…
sorry I was confused; the error occurred when I was running the "port clean installed" which I intermittently had to invoke when running out of space. So the ticket title is actually correct.
comment:6 Changed 16 years ago by febeling@…
Keywords: | clean added; upgrade removed |
---|
The error can easily be reproduced by
- installing a port
- removing the portfile
- re-creating the portindex
- then running
port clean installed
Sorry for the unclear report. Working on too many things at the same time.
comment:7 Changed 16 years ago by jmroot (Joshua Root)
Cc: | jmr@… added |
---|---|
Milestone: | MacPorts Future → MacPorts 1.8.0 |
Resolution: | → fixed |
Status: | new → closed |
Fixed in r50865.
The correct behaviour for port upgrade would be to handle the special case of an upgrade of a port which exists in the registry, but has disappeared from the index by removing it, just as new dependencies of upgrading ports get build and added automatically.
Currently this edge case is just not taken care of I guess, but I haven't read the code here.