Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#200 closed defect (fixed)

%prein scriptlet fails with status 2 with coreutils-8.25-1 update

Reported by: Lewis Rosenthal Owned by:
Priority: minor Milestone:
Component: rpm Version:
Severity: low Keywords:
Cc:

Description

I have seen this on several systems now, but I am not sure whether it may be a dependency issue (ordering of packages). YUM | update all from ANPM produces an error panel when finishing:

error: %prein(coreutils-8.25-1.oc00.i686) scriptlet failed, with exit status 2

I can;t find a report in yum.log or in anpm.log, and yum reinstall coreutils from a prompt seems to run without the error.

I'll update a few more systems from the prompt and see if i can catch this happening, as it would be odd for it to be coming from ANPM.

I also can't find anything actually wrong with anything in the coreutils package, either, even without the reinstall.

Attachments (2)

coreutils-error.txt (3.0 KB) - added by Lewis Rosenthal 8 years ago.
Commandline session upgrading coreutils; errors shown
rpm-tmp.SUFdgG (414 bytes) - added by Tellie 8 years ago.
The tmp file

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by Lewis Rosenthal

Attachment: coreutils-error.txt added

Commandline session upgrading coreutils; errors shown

comment:1 Changed 8 years ago by Silvan Scherrer

unfortunately there are more of those scriplet errors. I bet you use dash as shell. We will once fix them. But as those don't harm it's a bit lower priority atm.

comment:2 Changed 8 years ago by Tellie

Hello,

I did some test and this are the results,

http://pastebin.com/4uYX2EGe

And the tmp file contains:

# We must deinstall these info files since they're merged in
# coreutils.info. else their postun'll be run too late
# and install-info will fail badly because of duplicates
for file in sh-utils textutils fileutils; do
#  if [ -f /@unixroot/usr/share/info/$file.info.gz ]; then
#    /sbin/install-info --delete /@unixroot/usr/share/info/$file.info.gz --dir=/@unixroot/usr/share/info/dir &> /dev/null || :
#  fi
done
Last edited 8 years ago by Silvan Scherrer (previous) (diff)

Changed 8 years ago by Tellie

Attachment: rpm-tmp.SUFdgG added

The tmp file

comment:3 Changed 8 years ago by dmik

The script is not a valid sh script, ash eats it silently but strict dash barfs on it with:

rpm-tmp.SUFdgG: 8: rpm-tmp.SUFdgG: Syntax error: "done" unexpected

The fix is either to comment out for and done as well or add a NOP when commenting out the whole command block, like this:

# We must deinstall these info files since they're merged in
# coreutils.info. else their postun'll be run too late
# and install-info will fail badly because of duplicates
for file in sh-utils textutils fileutils; do
:
#  if [ -f /@unixroot/usr/share/info/$file.info.gz ]; then
#    /sbin/install-info --delete /@unixroot/usr/share/info/$file.info.gz --dir=/@unixroot/usr/share/info/dir &> /dev/null || :
#  fi
done

comment:4 Changed 8 years ago by Yuri Dario

The initial error is triggered by dash when invoked with -c command line option. It uses _PATH_BSHELL macro to execute scripts, and its definition in paths.h is using /@unixroot/bin/sh.

comment:5 Changed 8 years ago by Yuri Dario

spec: libc, Fix path definitions in paths.h header. ticket#200.
Committed revision r840.

comment:6 Changed 8 years ago by Silvan Scherrer

Resolution: fixed
Status: newclosed

the exit status 2 error should be fixed in r843

comment:7 Changed 8 years ago by Silvan Scherrer

just as crossreference ticket #133 was there for exactly that.

Note: See TracTickets for help on using tickets.