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.
Bug 1274211 - [RFE] Add strict mode to yum to return error if any requested packages were not available
Summary: [RFE] Add strict mode to yum to return error if any requested packages were n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.2
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: Eva Mrakova
Jiri Herrmann
URL:
Whiteboard:
: 1349693 1429685 (view as bug list)
Depends On: 1267234
Blocks: 1289025 1296649 1299750 1313485 1358495 1384256
TreeView+ depends on / blocked
 
Reported: 2015-10-22 09:34 UTC by Stephen Tweedie
Modified: 2020-09-10 09:28 UTC (History)
9 users (show)

Fixed In Version: yum-3.4.3-133.el7
Doc Type: Release Note
Doc Text:
New "skip_missing_names_on_install" and "skip_missing_names_on_update" options for *yum* The "skip_missing_names_on_install" and "skip_missing_names_on_update" options have been added to *yum* repository configuration. With "skip_missing_names_on_install" set to "False" in the `/etc/yum.conf` file, using the "yum install" command fails if *yum* cannot find one of the specified packages, groups, or RPM files. With "skip_missing_names_on_update" set to "False", using the "yum update" command fails if *yum* cannot find one of the specified packages, groups, or RPM files, or if they are available, but not installed.
Clone Of:
: 1358495 (view as bug list)
Environment:
Last Closed: 2016-11-04 05:29:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2397 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2016-11-03 13:55:12 UTC

Description Stephen Tweedie 2015-10-22 09:34:40 UTC
Description of problem:
"yum install" currently returns success if any of the requested packages were installed.  This masks errors if some of those packages were unavailable.

In a build environment (such as "docker build" executing a Dockerfile), failure to install a package is an error condition and should fail the build.  Otherwise the user is left debugging an incompletely built environment.

Failures can happen for all sorts of reasons --- transient errors, misconfigured repos or entitlement, or simple typos; and it is important to give the user prompt feedback when such failures occur, and to fail automated builds.


The preferred solution would allow us to configure a docker base image to select strict error handling for such cases as a default, without users being required to manually add a yum command line switch.  A yum.conf setting or installable yum plugin would work, for example.

Version-Release number of selected component (if applicable):
yum-3.4.3-125.el7.noarch

Comment 1 James Antill 2015-10-26 15:45:57 UTC
Note that one way to do this that works in el7.0 is:

ENV ipkgs zsh aslfjalf vim-enhanced iftop
RUN sh -c "for i in ${ipkgs}; do yum -y install-n \$i || exit 1; done"

Comment 7 John Jarvis 2016-03-02 15:08:58 UTC
Flagging for RHEL 7.2.z review.

Comment 21 Valentina Mukhamedzhanova 2016-06-28 12:42:38 UTC
*** Bug 1349693 has been marked as a duplicate of this bug. ***

Comment 28 errata-xmlrpc 2016-11-04 05:29:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2397.html

Comment 29 Valentina Mukhamedzhanova 2017-06-08 08:54:10 UTC
*** Bug 1429685 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.