[PATCH] Make 'yum install @group' give an error when trying to install a non-existent group

James Antill james at fedoraproject.org
Thu Jan 23 19:57:14 UTC 2014


On Thu, 2014-01-23 at 11:07 -0500, Valentina Mukhamedzhanova wrote:
> The purpose of this change is to make 'yum install @group' behaviour consistent with 'yum install package' behaviour.
> When user tries to install a non-existent package he gets an error and the exit code gets set to 1. This patch 
> makes group install behave in the same way.

 This isn't quite true, although maybe you know that. The rule is
everything has to fail, so this "always" works:

     yum install yum aksjflkajflajlaj

> The _at_groupinstall() code for normal groups and for environment groups was basically identical, so I merged it a little bit.
> I have also removed the try/except block since it appeared to have no effect.

 There are a couple of things to think about here:

1. base.install() can now throw GroupsError in code paths it couldn't
before, specifically if pattern is bad in some way.
 Probably need to create a GroupInstallError which inherits form
InstallError

2. The raised exception doesn't contain any information about the string
being used/etc. ... should at least give a message like InstallError
does, more would be better.

3. "yum upgrade alkfjalkjdflj" intentionally doesn't throw errors, it
now does for the @grp case.

4. "yum group install foo" should probably act the same as
"yum install @foo".



More information about the Yum-devel mailing list