Bug 1151222

Summary: Translations for some environment groups match ids of package groups: 'yum group install packagegroupid' will install the environment group
Product: [Fedora] Fedora Reporter: Adam Williamson (Red Hat non-Fedora) <awilliam>
Component: compsAssignee: Stephen Gallagher <sgallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: 21CC: garrett.mitchener, james.antill, kparal, notting, sgallagh, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-12 21:06:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Adam Williamson (Red Hat non-Fedora) 2014-10-09 19:57:15 UTC
danofsatx found an interesting issue this morning. On a Fedora 21 system, if you try this:

"yum group install web-server"

you probably intended to install the package group from comps with the id "web-server". However, the command will actually install the environment group with the id "web-server-environment".

With the help of geppetto, we figured out why this is. The <_name> of the 'web-server-environment' group is "Web Server". The German translation of this string - in po/de.po - is "Web-Server".

yum gives env groups priority over package groups, so before doing *any* matching against the list of package groups, it tries as hard as it can to match something in the list of env groups. One of the things it tries is a case-insensitive match against translations of the env group names, so it considers the env group 'web-server-environment' with the name "Web Server" to match the search 'web-server' because of the translation "Web-Server". It therefore goes ahead and takes that env group, without ever considering the package group with the id that exactly matched the search string.

It's kind of arguable whether yum's behaviour here is exactly what we'd want, but tweaking it is fairly sensitive. What we could do that would be less sensitive is somehow fix things up so the translation matches don't happen - either change the <_name> English strings (and ask the translators to make sure the translations of the new <_name>s don't clash) or change the clashing translations.

I wrote a truly hideous mess of shell one-liners and python to check for other collisions of this kind, and it finds three, all in the German translation:

Match found! Environment xfce-desktop-environment translation matches group xfce-desktop
 Match found! Environment gnome-desktop-environment translation matches group gnome-desktop
 Match found! Environment web-server-environment translation matches group web-server

The workaround for this is to run 'yum install @web-server' (or @gnome-desktop or whatever), because that syntax is specific to package groups (when using that syntax, you use @^ if you want to search environment groups).

Comment 1 Adam Williamson (Red Hat non-Fedora) 2015-02-20 04:07:11 UTC
as no-one seems interested in fixing this, we should probably document it...

Comment 2 Bill Nottingham 2015-02-24 19:06:07 UTC
Fixed.