Bug 251236 - %pre scripts die after cpio failure
%pre scripts die after cpio failure
Status: CLOSED DUPLICATE of bug 186945
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-07 17:06 EDT by Valdis Kletnieks
Modified: 2014-01-21 17:59 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-07 17:51:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Valdis Kletnieks 2007-08-07 17:06:58 EDT
Description of problem:
If an RPM fails to unpack because of a cpio issue, subsequent %pre scripts
also get flagged as failed, resulting in the RPMs being skipped

Version-Release number of selected component (if applicable):
yum-3.2.2-3.fc8

How reproducible:
Have 2 RPMs for updating, one of which will fail on the unpack (disk full or
R/O, etc), and the other with a %pre scriptlet.  The second will get bypassed.


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
I had about 300 RPMs waiting in Rawhide this morning.  kernel-devel didn't
unpacket, because /usr/src/ got full.  Subsequent scriptlets failed:

  Installing: kernel-devel                 ##################### [212/631] 
error: unpacking of archive failed on file
/usr/src/kernels/2.6.23-0.73.rc2.fc8-x86_64/scripts/genksyms/Makefile;46b8d361:
cpio: open
  Updating  : kudzu-devel                  ##################### [213/631] 
error:   install: %pre scriptlet failed (2), skipping initscripts-8.55-1
  Updating  : wine-core                    ##################### [215/631] 
error:   install: %pre scriptlet failed (2), skipping hal-0.5.10-0.git20070731.fc8

(Another 30 or so RPMs after that installed correctly, apparently because they
don't have %pre scripts).  I then tried a 'yum update initscripts', and that
worked fine.

I ran 'yum update' again, and it did it again:

Running Transaction
  Updating  : hal                          ####################### [ 1/44] 
  Updating  : gnome-mount                  ####################### [ 2/44] 
  Updating  : gnome-vfs2                   ####################### [ 3/44] 
  Updating  : libgnome                     ####################### [ 4/44] 
  Updating  : gnome-panel                  ####################### [ 5/44] 
  Updating  : control-center               ####################### [ 6/44] 
  Updating  : gnome-session                ####################### [ 7/44] 
  Updating  : gnome-applets                ####################### [ 8/44] 
  Updating  : nautilus-cd-burner           ####################### [ 9/44] 
  Updating  : gnome-power-manager          ####################### [10/44] 
  Updating  : file-roller                  ####################### [11/44] 
  Updating  : gnome-system-monitor         ####################### [12/44] 
  Updating  : httpd                        ####################### [13/44] 
  Updating  : gedit                        ####################### [14/44] 
  Updating  : eog                          ####################### [15/44] 
  Updating  : gnome-games                  ####################### [16/44] 
  Updating  : nautilus                     ####################### [17/44] 
  Installing: kernel-devel                 ####################### [18/44] 
error: unpacking of archive failed on file
/usr/src/kernels/2.6.23-0.73.rc2.fc8-x86_64/sound/usb: cpio: mkdir
error:   install: %pre scriptlet failed (2), skipping gdm-2.19.5-6.fc8
error:   install: %pre scriptlet failed (2), skipping xorg-x11-xfs-1.0.4-2
error:   install: %pre scriptlet failed (2), skipping evince-0.9.3-1.fc8
error:   install: %pre scriptlet failed (2), skipping yelp-2.19.1-3.fc8
  Cleanup   : gdm                          ####################### [23/44]
  Cleanup   : gdm                          ####################### [24/44]

(Notice that things processed *before* kernel-devel (such as hal) worked this
time, even though they failed the previous time. But the 4 that came after both
times failed both times.  I then cleaned up /usr/src so kernel-devel would fit,
and everything worked:

Running Transaction
  Updating  : xorg-x11-xfs                 ####################### [ 1/10] 
  Updating  : evince                       ####################### [ 2/10] 
  Installing: kernel-devel                 ####################### [ 3/10] 
  Updating  : gdm                          ####################### [ 4/10] 
  Updating  : yelp                         ####################### [ 5/10] 
  Cleanup   : xorg-x11-xfs                 ####################### [ 6/10]
  Cleanup   : evince                       ####################### [ 7/10]
  Cleanup   : gdm                          ####################### [ 8/10]
  Cleanup   : gdm                          ####################### [ 9/10]
  Cleanup   : yelp                         ####################### [10/10]

Smells like a failure to reset a return-code variable someplace...
Comment 1 Jeremy Katz 2007-08-07 17:51:59 EDT

*** This bug has been marked as a duplicate of 186945 ***
Comment 2 Valdis Kletnieks 2007-08-16 00:02:14 EDT
I don't think this is a dup of 186945 - that case was "the CPIO fails, but the
RPM says installed correctly".  My issue is that the CPIO fails, the RPM is
*not* installed (which is correct), but then OTHER transactions fail their %pre
*also*.

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