RPM

Comment 12 for bug 913221

Revision history for this message
In , Grigory (grigory-redhat-bugs) wrote :

Created attachment 534207
specfile for the first package

Description of problem:
1) Package2 requires Package1
2) Package1 has an error in the %pre scriptlet
3) Installation of the pair of packages should fail (I believe), but it just ignores an error in pkg1 and installs pkg2

Version-Release number of selected component (if applicable):
rpm-4.9.1.2-1.fc15.x86_64

How reproducible:
always

Steps to Reproduce:
$ cd ~/rpmbuild/SPECS/
$ rpmbuild -ba pkg1.spec pkg2.spec
$ sudo rpm -ihv ../RPMS/noarch/{pkg2-2-2,pkg1-1-1}.noarch.rpm
Preparing... ########################################### [100%]
error: %pre(pkg1-1-1.noarch) scriptlet failed, exit status 1
error: pkg1-1-1.noarch: install failed
   1:pkg2 ########################################### [ 50%]
$ rpm -q pkg1 pkg2
package pkg1 is not installed
pkg2-2-2.noarch
$ rpm -q --requires pkg2
pkg1

Actual results:
Package2 is installed

Expected results:
Installation of Package2 failed

Additional info:
The same is in CentOS-5.7 (rpm-4.4.2.3-22.el5_7.2).