[Yum-devel] [PATCH] Return an error code if yum can't install any of the specified packages
Seth Vidal
skvidal at fedoraproject.org
Thu Mar 11 20:35:40 UTC 2010
On Thu, 11 Mar 2010, Mike Bonnet wrote:
> On 03/11/2010 02:54 PM, James Antill wrote:
>> People want a bash scriptable way to say "X should be installed". So
>> with this patch:
>>
>> . If _any_ package specified: is installed already; or is found and will
>> be installed == yum returns 0 (or at least goes into depchecking etc.)
>>
>> . If _all_ package(s) are "not found", yum turns the message "Nothing to do"
>> into an error (returns 1, atm).
>>
>> ...thus:
>>
>> 1. yum install -y a b && echo worked
>>
>> This will echo "worked" if _either_ a or b is installed after yum
>> finishes, but tries to install both.
>
> I would argue that if I run "yum install -y a b" and either a or b is
> not found or not installable for any reason, then nothing should happen
> and yum should print an error and return a non-zero exitcode. Ignoring
> missing packages that are explicitly listed on the command-line has
> always seemed wrong.
if yum install only took pkgnames, I'd agree with you.
but it accepts wildcards and groupnames and provides and filenames so
tracing back what the user MEANT is tricksy.
for example:
yum install -y a*
-sv
More information about the Yum-devel
mailing list