Red Hat Bugzilla – Bug 684729
Missing %post and %postun scriptlet dependencies
Last modified: 2012-08-25 17:43:38 EDT
Description of problem:
Pango unconditionally uses some commands in %post and %postun for which there are no corresponding scriptlet dependencies, this can result in install/erase errors in transaction.
Version-Release number of selected component (if applicable):
At least pango 1.28.3-2.fc15 (rawhide, f15)
Steps to Reproduce:
1. yum --disablerepo="*" --enablerepo=rawhide --installroot=/home/test/ -y install pango
Installing : pango-1.28.3-2.fc15.x86_64 51/51
Non-fatal POSTIN scriptlet failure in rpm package pango-1.28.3-2.fc15.x86_64
/var/tmp/rpm-tmp.hTFXLn: line 15: sed: command not found
/var/tmp/rpm-tmp.hTFXLn: line 17: sed: command not found
/var/tmp/rpm-tmp.hTFXLn: line 24: /usr/bin/pango-querymodules-32: No such file or directory
warning: %post(pango-1.28.3-2.fc15.x86_64) scriptlet failed, exit status 127
Based on a quick look, the following dependencies should be added to ensure clean install + erase (file vs package dependencies is a matter of taste here):
Requires(post): /sbin/ldconfig /bin/sed
Requires(postun): /sbin/ldconfig /bin/sed
Actually the explicit /sbin/ldconfig requirement isn't strictly necessary as pango naturally already depends on glibc. In any case, the added sed dependency is needed.
Created attachment 509778 [details]
Fix scriptlet deps and avoid error on multilib erase
The %postun script will additionally end up being invoked despite of the "$1 -gt 0" test when both pango.i686 and pango.x86_64 are being removed in the same rpm transaction:
mock-chroot> rpm -e pango.i686 pango.x86_64
/var/tmp/rpm-tmp.Zl2DSB: line 26: /etc/pango/i386-redhat-linux-gnu/pango.modules: No such file or directory
The attached patch should fix both issues, let me know if you'd like me to commit and build this for devel.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
1.30.0-2 fixed the deps, and the multilib erase fix is now in 1.31.0-3.