[2/3] image.bbclass: create device table after package installation

Submitted by Qi.Chen@windriver.com on Aug. 13, 2013, 6:11 a.m.


Message ID 3c474c960bcd4be9cc9c780298f4f44935a732a3.1376363071.git.Qi.Chen@windriver.com
State Accepted
Commit d073ca77ba886c7912abd3ec0640881c00aea3bb
Headers show

Commit Message

Qi.Chen@windriver.com Aug. 13, 2013, 6:11 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Now that the makedevs supports using user/group names in the devcie
table files, and it uses passwd and group files under the rootfs which
is provided by the base-passwd package, we should let package installation
finish first, so that makedevs can get a correct mapping from user/group
names to uid/gid.

The check for existence of ${IMAGE_ROOTFS}/dev is removed. This is because
do_rootfs doesn't have 'nostamp' flag any more, so the do_rootfs task will
not be rerun for every build. Checking for the existence of ${IMAGE_ROOTFS}/dev
is not necessary any more. Besides, as base-files package also installs the
/dev directory, this checking does not serve as a good criteria.

[YOCTO #1159]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 meta/classes/image.bbclass |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index cf02f88..af10332 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -292,9 +292,9 @@  fakeroot do_rootfs () {
 	# copy the intercept scripts
 	cp ${COREBASE}/scripts/postinst-intercepts/* ${WORKDIR}/intercept_scripts/
-	# If "${IMAGE_ROOTFS}/dev" exists, then the device had been made by
-	# the previous build
-	if [ "${USE_DEVFS}" != "1" -a ! -r "${IMAGE_ROOTFS}/dev" ]; then
+	rootfs_${IMAGE_PKGTYPE}_do_rootfs
+	if [ "${USE_DEVFS}" != "1" ]; then
 		for devtable in ${@get_devtable_list(d)}; do
 			# Always return ture since there maybe already one when use the
 			# incremental image generation
@@ -302,8 +302,6 @@  fakeroot do_rootfs () {
-	rootfs_${IMAGE_PKGTYPE}_do_rootfs
 	# remove unneeded packages/files from the final image