Opened 15 years ago
Closed 15 years ago
#20649 closed defect (duplicate)
Cannot uninstall port that was deleted from MacPorts due to phantom dependency
Reported by: | gale@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | base | Version: | 1.7.1 |
Keywords: | Cc: | ||
Port: |
Description
When a port with dependents is deleted from MacPorts, the system often ends up in the following kind of inconsistent state:
$ port list xorg-liblbxutil $
So it's not in MacPorts now.
$ port echo installed | grep xorg-liblb xorg-liblbxutil @1.0.1_1
But it's still installed. Let's uninstall it:
$ sudo port uninstall xorg-liblbxutil ---> Unable to uninstall xorg-liblbxutil 1.0.1_1, the following ports depend on it: ---> xorg-libs Error: port uninstall failed: Please uninstall the ports that depend on xorg-liblbxutil first.
We can't uninstall it, because of a dependency. But wait - xorg-libs depends on a port that is not in MacPorts?
$ port deps xorg-lib | grep xorg-liblbxutil $
Or does it? MacPorts seems very confused.
Change History (4)
comment:1 follow-up: 2 Changed 15 years ago by nerdling (Jeremy Lavergne)
comment:2 Changed 15 years ago by gale@…
Replying to snc@…:
At some point was upgrade run on these ports?
On a regular basis, I do:
sudo port sync; port outdated; sudo port -u upgrade outdated
That's about it.
It would make sense to me that the dependency tree was not upgraded during the upgrade,
Yes, somehow the above regualr upgrade process seems to have caused that. And I'll emphasize that this has happened several times before, with other ports.
though all meta information available indicates there is no much dependency.
That is now. Apparently, xorg-libs did depend on xorg-lbxutil before the latter was removed from MacPorts.
Perhaps simply do a force uninstall to get rid of the symptoms?
Well, yes. But I'm going to wait this time, in case someone wants me to investigate further.
comment:3 Changed 15 years ago by blb@…
This is an issue with the way the dependency system in MacPorts currently works, in that when you install a port that has dependencies, those are recorded and kept around through upgrades. Hence, when you upgrade that port, and the new version no longer needs some dependency, it still remembers it anyway. So even though you've upgraded to a xorg-libs which no longer specifies a dependency on xorg-liblbxutil, since you had xorg-libs installed earlier that did, it remembers.
Like snc says, the forced uninstall is the way to remove it, and the only fix is to have an improved registry in MacPorts.
I'm not sure if there's a ticket specific to this issue so leaving open, though the need for a better registry is well known.
comment:4 Changed 15 years ago by jmroot (Joshua Root)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Dup of #13054.
This is likely a snowball of hurt. At some point was upgrade run on these ports? It would make sense to me that the dependency tree was not upgraded during the upgrade, though all meta information available indicates there is no much dependency.
Perhaps simply do a force uninstall to get rid of the symptoms?