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

James Antill james at fedoraproject.org
Fri Jan 24 19:51:59 UTC 2014

On Fri, 2014-01-24 at 11:34 -0500, Zdenek Pavlas wrote:
> >  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 exception is only propagated to the "for arg in userlist" loop, to skip
> the "done=True" assignment. If any other arg was ok, the patched code still
> tries to run the transaction.

 Yeh, that's what I was saying. AFAICS the code was correct and "yum
install yum @foo" didn't fail.

> > 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
> I'd say GroupsError is more appropriate, but maybe users
> handle InstallError and don't handle GroupsError.. ok.

 Yeh, it could go either way ... but I assume that
liveCD/kickstart/random is much more likely to be catching InstallError
and doing the right thing.

> > 3. "yum upgrade alkfjalkjdflj" intentionally doesn't throw errors, it
> > now does for the @grp case.
> Yes, updatePkgs() should catch this exception instead of failing, too..
> Dtto for reinstalls.

 The later is a very good point, I'm not sure what "yum reinstall @grp"
does and how well it works :-o.

> > 4. "yum group install foo" should probably act the same as
> > "yum install @foo".
> That's because "yum group install" code path does not use _at_group{install,..},
> but almost identical copy of the code..  This should be either merged
> or updated, too.

 Yeh, IIRC the _at_group* functions where initially a small wrapper that
removed the @ from the beginning of strings and called selectGroup() ...
they do a bit more now though.

More information about the Yum-devel mailing list