FS#9478 - can't remove a package when a group of the same name is installed
Attached to Project:
Pacman
Opened by Xavier (shining) - Wednesday, 06 February 2008, 19:09 GMT
Last edited by Xavier (shining) - Thursday, 24 July 2008, 09:23 GMT
Opened by Xavier (shining) - Wednesday, 06 February 2008, 19:09 GMT
Last edited by Xavier (shining) - Thursday, 24 July 2008, 09:23 GMT
|
Details
Summary and Info:
It is possible to have both a package and a group of the same name installed. For example it happened with xorg > sudo pacman -Qg xorg xorg xf86-input-keyboard xorg xf86-input-mouse xorg xf86-video-vesa xorg xorg-server xorg xorg-xinit xorg xterm > sudo pacman -Q xorg xorg 11R7.0-1 > sudo LANG=C pacman -R xorg :: group xorg: xf86-input-keyboard xf86-input-mouse xf86-video-vesa xorg-server xorg-xinit xterm Remove whole content? [Y/n] We would need a way to choose if we want to remove the package or the group. For example, pacman -Rg would only try to remove the group. And pacman -R would try to remove the package first, and if not found, the group. See also : http://bbs.archlinux.org/viewtopic.php?pid=303403#p303403 |
This task depends upon
Closed by Xavier (shining)
Thursday, 24 July 2008, 09:23 GMT
Reason for closing: Not a bug
Additional comments about closing: This bug report is no longer valid in 3.2 where the behavior is reversed. And anyway, it is not a big deal.
Thursday, 24 July 2008, 09:23 GMT
Reason for closing: Not a bug
Additional comments about closing: This bug report is no longer valid in 3.2 where the behavior is reversed. And anyway, it is not a big deal.
What about target-type modifiers?
With getopt() I have no better idea than the following:
# pacman -R mc -g gnome,devel -p xorg -g multimedia-plugins
[-g <target> indicates group, -p indicates package etc.].
/I don't like this syntax, but I like the idea.../
http://www.archlinux.org/pipermail/pacman-dev/2008-July/012315.html
What this does is just reversing the problem. You can't remove a group when a package of the same name is installed.
But probably that is nicer, since it's easier to just remove and reinstall one package than a whole group (or worse, a subset of a group).
So I would just close this, since we can't find a nice way to explicitly specify whether we want to remove a group or a package,
and last Nagy's patch has made this problem less annoying anyway.
I still vote for dividing group and literal remove (and install).
offtopic: I've just tried -Qqg, I'm pretty sure that we should omit group names here to ease up these "shell hacks": pacman -R `pacman -Qqg xorg`.
Do you mean dividing them in pacman interface (in the frontend), or in the code (maybe in the backend?) or both?
Anyway, feel free to start working on this and/or opening the discussion on the ML
> I've just tried -Qqg, I'm pretty sure that we should omit group names here to ease up these "shell hacks": pacman -R `pacman -Qqg xorg`.
The quiet flag is currently not used in -Qg output, feel free to provide a patch implementing that.