]> code.ossystems Code Review - openembedded-core.git/commitdiff
package_rpm.bbclass: ensure base-passwd and shadow get installed first
authorScott Garman <scott.a.garman@intel.com>
Fri, 23 Mar 2012 04:43:41 +0000 (21:43 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 23 Mar 2012 12:03:08 +0000 (12:03 +0000)
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]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/package_rpm.bbclass

index 80b16198d34eb7f4bd645ad7a4eb0145359fd482..e83fc552c9a68f9e311df9c026a66b8678ac278a 100644 (file)
@@ -439,7 +439,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