Bug 1043852 - Yum does not properly honour %pretrans
Summary: Yum does not properly honour %pretrans
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: yum
Version: 6.5
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Packaging Maintenance Team
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks: 1056252
TreeView+ depends on / blocked
 
Reported: 2013-12-17 10:53 UTC by Pablo Iranzo Gómez
Modified: 2018-12-06 15:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-26 08:52:47 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Pablo Iranzo Gómez 2013-12-17 10:53:01 UTC
Description of problem:
Yum is not honouring %pretrans:
#################################
Total size: 18
Installed size: 18
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : pretest2-1.0.0-7.lrh6.noarch                                                                                                                        1/1
this is pretrans
Starting post install for pretest2-1.0.0.7.lrh6 at Fri Dec 13 11:54:46 CST 2013
#################################

Which should be running before the 'Running transaction'



Version-Release number of selected component (if applicable):

yum-plugin-downloadonly-1.1.30-14.el6.noarch
yum-3.2.29-43.el6_5.noarch
yum-plugin-security-1.1.30-14.el6.noarch
rpm-4.8.0-37.el6.x86_64
rpm-python-4.8.0-37.el6.x86_64
yum-utils-1.1.30-14.el6.noarch
yum-metadata-parser-1.1.2-16.el6.x86_64
rpm-libs-4.8.0-37.el6.x86_64
yum-rhn-plugin-0.9.1-49.el6.noarch
[root@iranzo ~]# 


How reproducible:
- Create a spec file with a %pretrans section doing 'echo'
- Install it using yum


Actual results:
- 'Text' will be displayed after running transaction 

Expected results:
- 'Text' should be displayed before running transaction

Comment 2 Pablo Iranzo Gómez 2013-12-17 10:57:34 UTC
Fedora 20 still has this issue, but shows messages at a different point during yum installation (but still not prior to Running transaction)

rpm-4.11.1-7.fc20.x86_64
rpm-build-4.11.1-7.fc20.x86_64
rpm-build-libs-4.11.1-7.fc20.x86_64
rpm-libs-4.11.1-7.fc20.x86_64
rpm-python-4.11.1-7.fc20.x86_64

yum-3.4.3-120.fc20.noarch
yum-langpacks-0.4.3-1.fc20.noarch
yum-metadata-parser-1.1.4-9.fc20.x86_64
yum-plugin-fastestmirror-1.1.31-18.fc20.noarch
yum-plugin-merge-conf-1.1.31-18.fc20.noarch
yum-plugin-remove-with-leaves-1.1.31-18.fc20.noarch
yum-plugin-show-leaves-1.1.31-18.fc20.noarch
yum-plugin-versionlock-1.1.31-18.fc20.noarch
yum-utils-1.1.31-18.fc20.noarch
yumex-3.0.13-1.fc20.noarch

Comment 3 Panu Matilainen 2013-12-17 11:04:07 UTC
When %pretrans gets run is not in yum's control, %pretrans is executed by rpm it always occurs in the same spot. The *output* can (and often does) come later because of how yum wraps the logging from rpm.


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