aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2012-03-22 21:43:41 -0700
committerJoshua Lock <josh@linux.intel.com>2012-05-21 22:14:35 -0700
commitf35902844c5c1de06c9a1b2111abf0d8b5687a9b (patch)
tree48dff5e46d9553840153efdaede28e4afea3754c
parentd527f68bdf167b4a3dcc035968da59677abb70bb (diff)
downloadopenembedded-core-f35902844c5c1de06c9a1b2111abf0d8b5687a9b.zip
openembedded-core-f35902844c5c1de06c9a1b2111abf0d8b5687a9b.tar.gz
openembedded-core-f35902844c5c1de06c9a1b2111abf0d8b5687a9b.tar.bz2
package_rpm.bbclass: ensure base-passwd and shadow get installed first
When generating images, we need to make sure that base-passwd and shadow get installed before other packages, which might need to create custom user accounts. Thanks to Richard Purdie for the initial version of this fix. This fixes [YOCTO #2127] (From OE-Core rev: 3d2d3cb379608301b17ce57787d324c2f06bf4f9) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r--meta/classes/package_rpm.bbclass9
1 files changed, 8 insertions, 1 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 54d6c61..b511afd 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -379,7 +379,14 @@ package_install_internal_rpm () {
fi
- cat ${target_rootfs}/install/install_solution.manifest > ${target_rootfs}/install/total_solution.manifest
+ # If base-passwd or shadow are in the list of packages to install,
+ # ensure they are installed first to support later packages that
+ # may create custom users/groups (fixes Yocto bug #2127)
+ infile=${target_rootfs}/install/install_solution.manifest
+ outfile=${target_rootfs}/install/total_solution.manifest
+ cat $infile | grep /base-passwd-[0-9] > $outfile || true
+ cat $infile | grep /shadow-[0-9] >> $outfile || true
+ cat $infile | grep -v /shadow-[0-9] | grep -v /base-passwd-[0-9] >> $outfile
cat ${target_rootfs}/install/install_multilib_solution.manifest >> ${target_rootfs}/install/total_solution.manifest
# Construct install scriptlet wrapper