View Issue Details

IDProjectCategoryView StatusLast Update
0008318CentOS-6yumpublic2015-03-19 10:35
Reportertru 
PrioritynormalSeverityminorReproducibilityalways
Status confirmedResolutionopen 
Product Version6.6 
Target VersionFixed in Version 
Summary0008318: yum proceeds to install a package even if the required dependancy fails to install
DescriptionB: requires A
A:%pre fails
A is not installed, butt B is installed (although not functionnal)
TagsNo tags attached.

Activities

tru

tru

2015-03-19 09:29

administrator  

A.spec (344 bytes)
tru

tru

2015-03-19 09:29

administrator  

B.spec (321 bytes)
tru

tru

2015-03-19 09:30

administrator   ~0022542

rpmbuild A.spec
rpmbuild B.spec
createrepo

[tru@hp-elite840g1-1 noarch]$ sudo yum -d2 install B
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package B.noarch 0:0.1-1.c6 will be installed
--> Processing Dependency: A for package: B-0.1-1.c6.noarch
--> Running transaction check
---> Package A.noarch 0:0.1-1.c6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================
 Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
 B noarch 0.1-1.c6 test 2.2 k
Installing for dependencies:
 A noarch 0.1-1.c6 test 2.3 k

Transaction Summary
=====================================================================================================================================================
Install 2 Package(s)

Total download size: 4.5 k
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.1 MB/s | 4.5 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREIN scriptlet in rpm package A-0.1-1.c6.noarch
error: %pre(A-0.1-1.c6.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping A-0.1-1.c6
  Installing : B-0.1-1.c6.noarch 2/2
  Verifying : B-0.1-1.c6.noarch 1/2
  Verifying : A-0.1-1.c6.noarch 2/2

Installed:
  B.noarch 0:0.1-1.c6

Failed:
  A.noarch 0:0.1-1.c6

Complete!
[tru@hp-elite840g1-1 noarch]$ rpm -q A B
package A is not installed
B-0.1-1.c6.noarch
tru

tru

2015-03-19 09:36

administrator   ~0022543

remove B and retry installing with rpm only:

[tru@hp-elite840g1-1 noarch]$ sudo rpm -Uvh B-0.1-1.c6.noarch.rpm A-0.1-1.c6.noarch.rpm
Preparing... ########################################### [100%]
error: %pre(A-0.1-1.c6.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping A-0.1-1.c6
   1:B ########################################### [ 50%]
[tru@hp-elite840g1-1 noarch]$ rpm -q B A
B-0.1-1.c6.noarch
package A is not installed
tru

tru

2015-03-19 09:43

administrator  

C.spec (345 bytes)
tru

tru

2015-03-19 09:44

administrator   ~0022544

from #centos-devel chat, I have created C.spec with Requires(pre): A

Dependencies Resolved

=====================================================================================================================================================
 Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
 C noarch 0.1-1.c6 test 2.2 k
Installing for dependencies:
 A noarch 0.1-1.c6 test 2.3 k

Transaction Summary
=====================================================================================================================================================
Install 2 Package(s)

Total download size: 4.5 k
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
-----------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.1 MB/s | 4.5 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREIN scriptlet in rpm package A-0.1-1.c6.noarch
error: %pre(A-0.1-1.c6.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping A-0.1-1.c6
  Installing : C-0.1-1.c6.noarch 2/2
  Verifying : C-0.1-1.c6.noarch 1/2
  Verifying : A-0.1-1.c6.noarch 2/2

Installed:
  C.noarch 0:0.1-1.c6

Failed:
  A.noarch 0:0.1-1.c6

Complete!
tru

tru

2015-03-19 09:45

administrator   ~0022545

[tru@hp-elite840g1-1 noarch]$ sudo rpm -ivh C-0.1-1.c6.noarch.rpm A-0.1-1.c6.noarch.rpm
Preparing... ########################################### [100%]
error: %pre(A-0.1-1.c6.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping A-0.1-1.c6
   1:C ########################################### [ 50%]
[tru@hp-elite840g1-1 noarch]$ rpm -q A C
package A is not installed
C-0.1-1.c6.noarch
tru

tru

2015-03-19 09:52

administrator   ~0022546

upstream: https://bugzilla.redhat.com/show_bug.cgi?id=754727#c2

-> WONTFIX

so maybe asking the "right way" for easy/trivial case should be asked ;)
tru

tru

2015-03-19 10:07

administrator   ~0022548

"expected behaviour" according to the uptream comment: known defect/WONT FIX
tru

tru

2015-03-19 10:30

administrator   ~0022549

Last edited: 2015-03-19 10:35

View 2 revisions

workaround for trivial cases in the D.spec file
as hinted by https://bugzilla.redhat.com/show_bug.cgi?id=754727#c7
...

Dependencies Resolved

================================================================================
 Package Arch Version Repository Size
================================================================================
Installing:
 D noarch 0.1-1.c6 test 2.5 k
Installing for dependencies:
 A noarch 0.1-1.c6 test 2.3 k

Transaction Summary
================================================================================
Install 2 Package(s)

Total download size: 4.7 k
Installed size: 0
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 1.2 MB/s | 4.7 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Error in PREIN scriptlet in rpm package A-0.1-1.c6.noarch
error: %pre(A-0.1-1.c6.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping A-0.1-1.c6
Error in PREIN scriptlet in rpm package D-0.1-1.c6.noarch
error: %pre(D-0.1-1.c6.noarch) scriptlet failed, exit status 1
error: install: %pre scriptlet failed (2), skipping D-0.1-1.c6
  Verifying : D-0.1-1.c6.noarch 1/2
  Verifying : A-0.1-1.c6.noarch 2/2

Failed:
  A.noarch 0:0.1-1.c6 D.noarch 0:0.1-1.c6

Complete!

tru

tru

2015-03-19 10:30

administrator  

D.spec (528 bytes)

Issue History

Date Modified Username Field Change
2015-03-19 09:25 tru New Issue
2015-03-19 09:29 tru File Added: A.spec
2015-03-19 09:29 tru File Added: B.spec
2015-03-19 09:30 tru Note Added: 0022542
2015-03-19 09:36 tru Note Added: 0022543
2015-03-19 09:43 tru File Added: C.spec
2015-03-19 09:44 tru Note Added: 0022544
2015-03-19 09:45 tru Note Added: 0022545
2015-03-19 09:52 tru Note Added: 0022546
2015-03-19 10:07 tru Note Added: 0022548
2015-03-19 10:07 tru Status new => confirmed
2015-03-19 10:30 tru Note Added: 0022549
2015-03-19 10:30 tru File Added: D.spec
2015-03-19 10:35 tru Note Edited: 0022549 View Revisions