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)

by Lewis Rosenthal, 8 years ago

Attachment: coreutils-error.txt added

Commandline session upgrading coreutils; errors shown

comment:1 by Silvan Scherrer, 8 years ago

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 by Tellie, 8 years ago

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)

by Tellie, 8 years ago

Attachment: rpm-tmp.SUFdgG added

The tmp file

comment:3 by dmik, 8 years ago

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 by Yuri Dario, 8 years ago

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 by Yuri Dario, 8 years ago

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

comment:6 by Silvan Scherrer, 8 years ago

Resolution: fixed
Status: newclosed

the exit status 2 error should be fixed in r843

comment:7 by Silvan Scherrer, 8 years ago

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

Note: See TracTickets for help on using tickets.