Bug 1322792 - Failure in %pretrans still installs dependencies
Summary: Failure in %pretrans still installs dependencies
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.7
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1499211
TreeView+ depends on / blocked
 
Reported: 2016-03-31 10:53 UTC by Assen Totin
Modified: 2017-12-06 12:16 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-06 12:16:09 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Assen Totin 2016-03-31 10:53:22 UTC
Description of problem:
When a %prentans script is specified in a spec file and it exits with non-zero code, the installation of the current RPM is aborted; however, if additional packages were selected as dependencies, they still get installed even though the %pretrans has failed and the main RPM does not get installed.

It is important to note that %pretrans is checked before any dependencies are installed, so a failure there should abort the whole transaction (including the dependencies).

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

How reproducible:
Every time.

Steps to Reproduce:
1. Create an RPM from a spec file which has a %prentans section. Add a dependency RPM package to the spec and make the %pretrans section exit with non-zero code.
2. Install the RPM package on a machine where the dependency RPM package is missing. 

Actual results:
The %preptans will fail and the main RPM package will not be installed, but the dependency package will be installed.

Expected results:
The dependency packages should not be installed if a %pretrans form the main RPM has failed. 

Additional info:
The main problem here is not so much the fact that dependencies still get installed, but the fact that the failure of %pretrans from the main RPM (hence the failure to install the main RPM) remains obscure, especially if running yum in interactive mode from console. One can well consider the main RPM installed, which leads to much confusion later about it actually missing.

Comment 2 Jan Kurik 2017-12-06 12:16:09 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/


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