Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
"yum -y install bash aa" will return zero even thought 'aa' is non-existant. I
believe that zero should indicate that everything has passed correctly and not
some of the operations passed correctly as it does now. It also is not consistent with
'yum -y install aa' correctly returning 1.
Version-Release number of selected component (if applicable):
yum-3.4.3-46.el7.noarch
How reproducible: always
Steps to Reproduce:
1. 'yum -y install aa bash'
2. echo $?
Actual results:
returns zero
Expected results:
returns non-zero
Additional info:
Please correct it so we can rely on yum to have installed everything he had
been told.
I'm quite sure that it works this way since ever. What I believe is just plain wrong is that zero is returned but not all of the action has been successfully done.
I do not agree with simply saying that it has always been like this because it is no reasen for returning zero (which says everything worked correctly) in place of returning non-zero (some or all of the things wanted to pass have failed).
Again, backwards compatibility is meaningful ... there are a number of cases where it's useful to say:
yum install foo bar baz
...and you only want those packages that are available to be installed. This is even more problematic with other yum commands, and having yum commands act on the arguments to return value differently is not going to help anybody.
If you really want to check are "X, Y, Z" installed/latest-version/whatever there are ways you can do that efficiently via. the command line or the API.
If you want even simpler ways to look for specific sets of packages, maybe you could look at an RFE for passing a group of packages to "yum version"?