You are not logged in.
[karol@black ~]$ sudo pacman -S mplayer2
resolving dependencies...
looking for inter-conflicts...
:: mplayer2 and mplayer are in conflict. Remove mplayer? [y/N]
pacman removes just mplayer and leaves all the 'dangling' dependencies - packages that were needed by mplayer, but are not needed by mplayer2. Can this behavior be changed to 'pacman -Rns foo'? Is there such an option in pacman or are users expected to deal with this manually?
Offline
Good one, i think this would be best reported on flyspray or the mailinglist.
ᶘ ᵒᴥᵒᶅ
Offline
That is why `pacman -Qdt` exist.
pacman -Rsn `pacman -Qqdt`
Last edited by JokerBoy (2011-04-07 18:26:11)
Arch64/DWM || My Dropbox referral link
Offline
pacman -Qdt is not the greatest solution as long as we can't link optional dependencies to their "parent" package... That is, if you install optional dependencies with --asdeps.
Offline
[karol@black ~]$ sudo pacman -S mplayer2 resolving dependencies... looking for inter-conflicts... :: mplayer2 and mplayer are in conflict. Remove mplayer? [y/N]
pacman removes just mplayer and leaves all the 'dangling' dependencies - packages that were needed by mplayer, but are not needed by mplayer2. Can this behavior be changed to 'pacman -Rns foo'? Is there such an option in pacman or are users expected to deal with this manually?
I'm thinking it's for the best that you're expected to deal with this manually. If you want the behavior of pacman -Rsn mplayer, then do that instead of letting pacman remove just mplayer on the conflict.
Offline
karol wrote:[karol@black ~]$ sudo pacman -S mplayer2 resolving dependencies... looking for inter-conflicts... :: mplayer2 and mplayer are in conflict. Remove mplayer? [y/N]
pacman removes just mplayer and leaves all the 'dangling' dependencies - packages that were needed by mplayer, but are not needed by mplayer2. Can this behavior be changed to 'pacman -Rns foo'? Is there such an option in pacman or are users expected to deal with this manually?
I'm thinking it's for the best that you're expected to deal with this manually. If you want the behavior of pacman -Rsn mplayer, then do that instead of letting pacman remove just mplayer on the conflict.
The question is why would you want to keep dangling dependencies? What's the benefit of keeping things as they are now?
Offline
falconindy wrote:karol wrote:[karol@black ~]$ sudo pacman -S mplayer2 resolving dependencies... looking for inter-conflicts... :: mplayer2 and mplayer are in conflict. Remove mplayer? [y/N]
pacman removes just mplayer and leaves all the 'dangling' dependencies - packages that were needed by mplayer, but are not needed by mplayer2. Can this behavior be changed to 'pacman -Rns foo'? Is there such an option in pacman or are users expected to deal with this manually?
I'm thinking it's for the best that you're expected to deal with this manually. If you want the behavior of pacman -Rsn mplayer, then do that instead of letting pacman remove just mplayer on the conflict.
The question is why would you want to keep dangling dependencies? What's the benefit of keeping things as they are now?
*Not* removing something that the user has not specified he wants removed.
Each command to pacman 'means' something. This is for the same reason that pacman -R foo doesn't remove foo's dependencies, because -R just means "please remove this package". -Rns means "please remove this package and its unused dependencies.
In the case of pacman -S bar, where bar replaces foo (but changes dependencies), there's ambiguity as to whether the user intends pacman -R or pacman -Rns, so pacman errs on the safe side.
Or, seen differently, if you want the dependency removed you're gonna have to specify that. -S does not. Perhaps you COULD request additional options to -S which would do what you want (doubt it'd have much uptake though).
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
*Not* removing something that the user has not specified he wants removed.
Each command to pacman 'means' something. This is for the same reason that pacman -R foo doesn't remove foo's dependencies, because -R just means "please remove this package". -Rns means "please remove this package and its unused dependencies.
In the case of pacman -S bar, where bar replaces foo (but changes dependencies), there's ambiguity as to whether the user intends pacman -R or pacman -Rns, so pacman errs on the safe side.
Or, seen differently, if you want the dependency removed you're gonna have to specify that. -S does not. Perhaps you COULD request additional options to -S which would do what you want (doubt it'd have much uptake though).
Agreed, but it might not be a bad idea to at least notify the user that any leftover dependencies won't be removed. It is sort of counterintuitive that during an upgrade action that is designed to replace packages, you need to actively cancel the running action, remove a to-be-replaced package with a different command and then re-run the update, unless you want to be stuck with a possibly large number of unneeded other packages. So in this case some extra feedback to the user could be helpful.
ᶘ ᵒᴥᵒᶅ
Offline
I finally managed to file a feature request https://bugs.archlinux.org/task/24005
Offline
Thank you. I agree that it makes sense to atleast warn the user for starters.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Thank you. I agree that it makes sense to atleast warn the user for starters.
What's the point, if it is already known? Besides, who said that I do not need some of the mplayer deps?
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
What's the point, if it is already known? Besides, who said that I do not need some of the mplayer deps?
Huh?
I want to remove mplayer and all the unneeded deps and install mplayer2 and its deps. I would like to do it in one go.
Offline
Right, by what if you are actually using those 'unneeded deps' for purposes other than mplayer/mplayer2? Just because a package is marked "asdep" does not imply that it has no stand-alone role...
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Right, by what if you are actually using those 'unneeded deps' for purposes other than mplayer/mplayer2? Just because a package is marked "asdep" does not imply that it has no stand-alone role...
I understand it's possible and I don't want to make 'pacman -Rns' the default behavior. This way you can chose the style that suits you (if it gets implemented ;P).
You can change the install reason of the standalone packages.
Offline
'unneeded deps' would mean that they are no longer needed by any app on your machine.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
'unneeded deps' would mean that they are no longer needed by any app on your machine.
At least in theory you can have package A that is a dependency for package B and you decide to remove package B but keep package A. Even if it was installed as a dependency for package B, you can change the install reason to 'explicitly installed'.
There shouldn't be any packages with 'Install Reason : Installed as a dependency for another package' and 'Required By : None'.
Offline
Well, in theory. But in practice, that's going to be a mess. Example: libunique on one machine was installed asdep and correctly picked up by pacman -Qdt, while on the other it is listed as explicit. Why? who knows...
I think that the install reason should be there only for informational purposes, not as an indicator to take actions. Otherwise, to avoid wrong packages to be removed, I'll have to go through the list of packages everyday with pacman -D, as the output of pacman -Qdt changes pretty often. This kind of bookkeeping will work on a RHEL-type system, but not on a rolling release OS, especially as actively updated as Arch.
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Well, in theory. But in practice, that's going to be a mess. Example: libunique on one machine was installed asdep and correctly picked up by pacman -Qdt, while on the other it is listed as explicit. Why? who knows...
There were some issues with clyde, maybe this will shed some light on the matter: https://bbs.archlinux.org/viewtopic.php … 61#p912361
Offline
OK, let me rephrase my previous post, and compare complexities of the two situations:
(1) Current situation -- "pacman -S <-- y" replaces only the current pkg.
I have to check pacman -Qdt to remove possible leftover deps.
(2) New situation -- "pacman -S --autoclean-deps" removes the current pkg + all its unneeded deps.
I have to check pacman -Qi <current pkg> before the operation, in order to verify that nothing useful gets removed.
Personally, I think that (1) is less breakage-prone...
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Personally, I think that (1) is less breakage-prone...
I agree, but nobody will take it away from you. I wanted to suggest an option to remove the unneeded dependencies more aggressively.
Seems that there is an old bug that deals with the same / similar issue https://bugs.archlinux.org/task/5974
Offline
Leonid.I wrote:Personally, I think that (1) is less breakage-prone...
I wanted to suggest an option to remove the unneeded dependencies more aggressively.
I'm ok with that, as long as it's not the default...
Seems that there is an old bug that deals with the same / similar issue https://bugs.archlinux.org/task/5974
Good point. This and your feature request do indeed ask for the same option switch. In the older report, however, the concensus seems to be in favor of the manual orphan management
EDIT: Off-topic. Does anyone know how fluxbb manages timestamps? Because right now they seem to be in a random timezone... and very inconvenient for discussions like the present one.
Last edited by Leonid.I (2011-05-02 22:22:57)
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
Good point. This and your feature request do indeed ask for the same option switch. In the older report, however, the concensus seems to be in favor of the manual orphan management
So maybe we can close two bugs as a 'won't fix' :-)
EDIT: Off-topic. Does anyone know how fluxbb manages timestamps? Because right now they seem to be in a random timezone... and very inconvenient for discussions like the present one.
Go to your profile and fiddle with the timezones. I'm UTC +1 w/ DST and the forum timestamps are OK.
Offline
*Not* removing something that the user has not specified he wants removed.
Each command to pacman 'means' something. This is for the same reason that pacman -R foo doesn't remove foo's dependencies, because -R just means "please remove this package". -Rns means "please remove this package and its unused dependencies.
In the case of pacman -S bar, where bar replaces foo (but changes dependencies), there's ambiguity as to whether the user intends pacman -R or pacman -Rns, so pacman errs on the safe side.
Or, seen differently, if you want the dependency removed you're gonna have to specify that. -S does not. Perhaps you COULD request additional options to -S which would do what you want (doubt it'd have much uptake though).
Technically, the user never specified that he or she wanted the dependencies in the first place; a package that the user wanted pulled in the dependencies.
This doesn't mean that dependencies should be removed automatically, but, as Inxsible noted, users should definitely be warned when a package is orphaned (and possibly asked if it should be removed).
Offline