Bug 936 - alternatives errors during postinst processing
Summary: alternatives errors during postinst processing
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.0
Hardware: Beagleboard arm
: Medium normal
Target Milestone: 1.1 M4
Assignee: Xiaofeng Yan
QA Contact:
URL:
Whiteboard: pulled request, waiting for merging ...
Depends on:
Blocks:
 
Reported: 2011-03-28 06:48 UTC by Paul Eggleton
Modified: 2011-08-26 02:14 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
boot log for beagleboard xm with 1.0 lsb-sdk image (16.59 KB, text/plain)
2011-03-28 06:48 UTC, Paul Eggleton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2011-03-28 06:48:13 UTC
Created attachment 125 [details]
boot log for beagleboard xm with 1.0 lsb-sdk image

During postinst processing on the BeagleBoard on first bootup of the lsb-sdk image I get a number of messages indicating the command-line for update-alternatives may be incorrect (the help message is printed). The problem occurs within the postinst for "shadow" however when I run "sh /etc/rpm-postinsts/shadow.sh.done" manually it works fine.

Upon closer inspection I discovered there are actually two "update-alternatives" installed: one in /usr/sbin from chkconfig (symlinked to "alternatives"), and the other in /usr/bin from update-alternatives-cworth. It appears for whatever reason that the one from chkconfig is run during postinst processing but if you run the script from the command line it gets the other one; presumably this is due to differences in the PATH environment variable.

Surely only one of these needs to be installed...?
Comment 1 Richard Purdie 2011-03-31 04:16:46 UTC
The one from chkconfig should probably not be installed, the other is certainly the one we want.
Comment 2 Xiaofeng Yan 2011-08-09 03:15:47 UTC
inittab
  -->rcS
     -->./S40networking(PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)
     -->S98configure(call rpm-postinstall)
  -->rc5.d
  -->profile(profile:4:PATH="/usr/local/bin:/usr/bin:/bin"
             profile:15:   PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin)
     

So as Paul said, this is due to differences in the PATH environment variable.
Comment 4 Yi Zhao 2011-08-26 02:14:41 UTC
Verified with 20110824 build. Only one "update-alternatives" is installed. 

###############
root@qemuarm:~# rpm -ql chkconfig
/etc
/etc/alternatives
/etc/chkconfig.d
/sbin
/sbin/chkconfig
/usr
/usr/sbin
/usr/sbin/alternatives
/usr/sbin/ntsysv
/var
/var/lib
/var/lib/alternatives

root@qemuarm:~# rpm -ql update-alternatives-cworth
/usr
/usr/bin
/usr/bin/update-alternatives
root@qemuarm:~# 
#############