Bug 9521

Summary: Can't install dbus
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Gary Thomas <gary>
Component: coreAssignee: Ross Burton <ross.burton>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: Medium+ CC: jose.perez.carranza, meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: 2.2 M1   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Gary Thomas 2016-04-26 13:24:51 UTC
Trying to install dbus-1 on an existing system (using opkg) fails:

Installing shadow-base (4.2.1-r0.0) on root.
Downloading http://192.168.1.15/teton-p7618-feeds/cortexa7-neon/shadow-base_4.2.1-r0.0_cortexa7-neon.ipk.
 Removing any system startup links for dbus-1 ...
Running groupadd commands...
NOTE: dbus: Performing groupadd with [ -r netdev]
ERROR: dbus: groupadd command did not succeed.
To remove package debris, try `opkg remove dbus-1`.
To re-attempt the install, try `opkg install dbus-1`.
Collected errors:
 * pkg_run_script: package "dbus-1" preinst script returned status 1.
 * preinst_configure: Aborting installation of dbus-1.

Once in this state, dbus-1 is neither installed nor not installed (stuck)

Tested with Poky 20a0121b558b32179220e394a66cb90dc6ff3879

Note: dbus can be installed initially in an image just fine, just not after the fact.
Comment 1 Ross Burton 2016-04-26 16:37:38 UTC
Pasting from the relevant thread:

"""
Interesting info from 'strace'

1147  execve("/usr/local/bin/ groupadd -r netdev", [" groupadd -r netdev"], [/* 12 vars */]) = -1 ENOENT (No such file or directory)
1147  execve("/usr/bin/ groupadd -r netdev", [" groupadd -r netdev"], [/* 12 vars */]) = -1 ENOENT (No such file or directory)
1147  execve("/bin/ groupadd -r netdev", [" groupadd -r netdev"], [/* 12 vars */]) = -1 ENOENT (No such file or directory)
1147  execve("/usr/local/sbin/ groupadd -r netdev", [" groupadd -r netdev"], [/* 12 vars */]) = -1 ENOENT (No such file or directory)
1147  execve("/usr/sbin/ groupadd -r netdev", [" groupadd -r netdev"], [/* 12 vars */]) = -1 ENOENT (No such file or directory)
1147  execve("/sbin/ groupadd -r netdev", [" groupadd -r netdev"], [/* 12 vars */]) = -1 ENOENT (No such file or directory)
"""

Looks a lot like execve is being passed a bad path as there's a space between the $PATH entry and groupadd.
Comment 2 Ross Burton 2016-04-26 16:39:57 UTC
Can you cherry-pick 84686b51043c5a6b0ae184d00f547ccbd7832f39 and see if that fixes it please?
Comment 3 Gary Thomas 2016-04-27 06:17:51 UTC
(In reply to comment #2)
> Can you cherry-pick 84686b51043c5a6b0ae184d00f547ccbd7832f39 and see if that
> fixes it please?

Yes, that does fix it.
Comment 4 Ross Burton 2016-04-27 07:39:25 UTC
So the workaround is to install core-utils in images so that flock is core-utils instead of busybox.  We're literally about to release so this may have to be release noted for 2.1.
Comment 5 Ross Burton 2016-04-28 14:46:22 UTC
Marking a duplicate of bug 9496.

*** This bug has been marked as a duplicate of bug 9496 ***
Comment 6 Jose Perez C 2016-07-29 15:44:45 UTC
duplicated bug