View Issue Details

IDProjectCategoryView StatusLast Update
0014813CentOS-7yumpublic2018-05-18 21:40
Reporterjjoconnor15 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version7.4.1708 
Target VersionFixed in Version 
Summary0014813: %pretrans failure still installs dependent packages
DescriptionObserved behavior:
1) Have two packages A and B
2) B depends on an exact version of A
3) upgrade from A 0 and B 0 to A 1 and B 1
4) A 1 fails in %pretrans, but B finshes installing
5) observe that we have A 0 but B 1 even though B requires an exact match of A's version

Expected behavior:
An exit in %pretrans should abort the whole transaction of the current yum call instead of allowing the install to continue and break dependencies.
Steps To ReproduceI have attached my simple reproduction of the issue in a tarball with 4 spec files and a script that builds and installs the rpms according to the steps above. Also in the tarball is the full output from one of my runs of the script on my CentOS system.

With my script, run it and look for the "=== The right column should always match" lines at two locations.

You can also produce your own rpms with the following conditions and observe the behavior:
1) A and B are packages
2) B Requires A
3) A has a non-zero exit in %pretrans
4) install both packages in the same yum install call and B is installed but A is not

My examples are an extension of this behavior where A and B have two versions each and the Requires of B wants to match an exact version of A.
Additional InformationMy Environment:
$ rpm --version
RPM version 4.11.3

$ cat /etc/*release*
CentOS Linux release 7.4.1708 (Core)
Derived from Red Hat Enterprise Linux 7.4 (Source)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.4.1708 (Core)
CentOS Linux release 7.4.1708 (Core)
cpe:/o:centos:centos:7

$ rpmbuild --version
RPM version 4.11.3

$ yum --version
3.4.3
  Installed: rpm-4.11.3-25.el7.x86_64 at 2018-05-15 17:45
  Built : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-03 03:48
  Committed: Panu Matilainen <pmatilai@redhat.com> at 2017-03-17

  Installed: yum-3.4.3-154.el7.centos.noarch at 2018-05-15 17:45
  Built : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-05 19:13
  Committed: CentOS Sources <bugs@centos.org> at 2017-08-01

  Installed: yum-plugin-fastestmirror-1.1.31-42.el7.noarch at 2018-05-15 17:45
  Built : CentOS BuildSystem <http://bugs.centos.org> at 2017-08-11 10:23
  Committed: Valentina Mukhamedzhanova <vmukhame@redhat.com> at 2017-03-21
TagsNo tags attached.
abrt_hash
URL

Activities

jjoconnor15

jjoconnor15

2018-05-15 19:47

reporter  

testrpm.tar.gz (2,394 bytes)

Issue History

Date Modified Username Field Change
2018-05-15 19:47 jjoconnor15 New Issue
2018-05-15 19:47 jjoconnor15 File Added: testrpm.tar.gz