FS#27660 - Handle case where group and package has the same name

Attached to Project: Pacman
Opened by Magnus Therning (magus) - Wednesday, 21 December 2011, 14:58 GMT
Last edited by Allan McRae (Allan) - Sunday, 31 January 2016, 05:15 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 3.5.4
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


Summary and Info:
In some unfortunate cases there have been a group with the same name as a package, it is then not possible to install the group directly. See the discussion in https://mailman.archlinux.org/pipermail/arch-general/2011-April/019670.html

Steps to Reproduce:
Currently "systemd" is both a package and group in [community].

$ sudo pacman -Sg systemd
systemd initscripts-systemd
systemd systemd
systemd systemd-arch-units
$ sudo pacman -S systemd
resolving dependencies...
looking for inter-conflicts...

Targets (1): systemd-37-2

Total Download Size: 0.79 MB
Total Installed Size: 5.11 MB

Proceed with installation? [Y/n]

Would it not be good to be able to distinguish between groups and packages when calling 'pacman -S', e.g. by postfixing the group name ('pacman -S systemd/group' maybe)?
This task depends upon

Closed by  Allan McRae (Allan)
Sunday, 31 January 2016, 05:15 GMT
Reason for closing:  Won't implement
Comment by Dave Reisner (falconindy) - Thursday, 22 December 2011, 01:02 GMT
If any change were to be made here, I'd say that groups should be resolved before packages. We already have a natural repo/pkgname override in place that could trump that. I don't know offhand if there would be any side effects to doing this.

Side note: someone oughta smack the guy who did this. ;)
Comment by Dan McGee (toofishes) - Thursday, 22 December 2011, 01:17 GMT
Biggest reason we don't do groups first:

1) 95% of the time, people are installing packages, not groups.
2) Old database format had to load every single sync desc and depends file to get the list of groups; this was super expensive. This doesn't hold anymore, obviously.

I personally am a -1 on changing it that way; I feel like groups are only a helper, and an explicit package name should take preference, but that could just be me being stubborn.
Comment by Dave Reisner (falconindy) - Thursday, 22 December 2011, 13:30 GMT
Sounds sane to me, and I think this is rare enough that it probably doesn't make sense to give it any special handling. I'll just mark this a packaging bug and remove/change the systemd group.
Comment by Dennis Schridde (devurandom) - Friday, 23 December 2016, 21:47 GMT
Also affects the "rust" group:
# pacman -Sg rust
rust cargo
rust rust
rust rust-docs
Comment by Alexander F. Rødseth (xyproto) - Thursday, 02 March 2017, 22:48 GMT
The day someone creates a tetris clone named "base-devel" this might be a real issue.

How about users having to specify it explicitly when they are installing a group? CentOS/RHEL 7/6 uses "yum group install 'Development Tools'" and I've also seen "yum install @development-tools". A flag would also be possible.

Explicit is better than implicit, right?