[Yum-devel] Changed behavior of 'yum list available'

James Antill jantill at redhat.com
Wed Sep 26 02:11:54 UTC 2007


On Tue, 2007-09-25 at 17:27 -0700, David Lutterkort wrote:
> With commit 809c2bb1b5708d7529544c837adaa3a6949e8119, 'yum list
> available foo' makes yum exit with an error when there are no pending
> updates for foo, even if it is a legitimate package.

 By "legitimate" you mean, is installed ... no? The change was done due
to a customer request, but personally I feel that if you do list "foo",
and "foo" doesn't exist, yum shouldn't just pretend everything is fine.
Much like ls foo, does.

> I don't understand why yum would exit with an error in that situation -
> could that change be rolled back and an update pushed to FC7?

 Why do you think it shouldn't do anything? Ie. what's the rationale,
apart from that's what it used to do?
 Do you think it should exit 0 if you do "yum list available foo*" and
there is nothing starting with foo?
 I assume the customer wanted to use yum from a script, like:

 if yum list blah; then

...can you think of another way to solve that problem?


 So saying all that, I guess I assumed that some of the other commands
were covered but a quick test now shows that:

 yum install foo
 yum whatprovides foo
 yum list-security foo
 yum seach foo
 yum grouplist foo
 [... probably etc. ... ]

...all exit 0, if foo doesn't exist. So we need to change something to.

>  Needless
> to say, it breaks puppet's yum-based package updates, and the workaround
> on the puppet end would require completely ignoring any exit code from
> yum.

 Well I think it'd be a good idea to have a specific exit code for "no
match for input", which would solve that problem ... no?

-- 
James Antill <jantill at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070925/f4e451fd/attachment.pgp 


More information about the Yum-devel mailing list