[Yum-devel] [PATCH] yum list <pattern> gets a failure exit code

seth vidal skvidal at linux.duke.edu
Tue Jul 31 20:06:09 UTC 2007


On Tue, 2007-07-31 at 15:59 -0400, James Antill wrote:
> On Tue, 2007-07-31 at 15:46 -0400, seth vidal wrote:
> 
> > yum list FOO BAR
> > 
> > and FOO exists but BAR does not exist
> > 
> > you'll end up with a success code.
> > 
> > is that what we want?
> 
>  Maybe not, I chose that way because it was the easiest way out ...
> working out the correct thing for each argument required a lot more code
> changes.

And reporting that becomes less and less obvious in a single result
code.

Maybe we just return a bitmask - for each argument that failed/succeeded
a 0 or a 1 :) And before anyone implements that, I'm kidding, bit masks
are a pain to decipher for anyone who doesn't think that way (which is
most people in the world) and are therefore a bad thing to unleash on
users.


> > /me hates partial failure result codes
> 
>  I can change it to fail if anything doesn't match, but it'll require a
> dict for each argument ... and changing returnPkgLists() etc. Upto you.

I'm mostly fine with it as it is - but I was concerned that what you
implemented was what you actually intended.
-sv







More information about the Yum-devel mailing list