Skip to contentSkip to conversation

image.bbclass: ensure makedevs does return true

PATCH In review Saul Wold 2 participants 2 messages Oct 1, 2013

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 image.bbclass: ensure makedevs does return true

When doing an incremental image generation, ensure that makedevs returns true when it encounters a node that already exists, otherwise image generation will fail.

[YOCTO #5288]

---
 meta/classes/image.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image.bbclass +1 -1
index 7650594..463fa71 100644
@@ -337,7 +337,7 @@ fakeroot do_rootfs () {
 		for devtable in ${@get_devtable_list(d)}; do
 			# Always return ture since there maybe already one when use the
 			# incremental image generation
-			makedevs -r ${IMAGE_ROOTFS} -D $devtable
+			makedevs -r ${IMAGE_ROOTFS} -D $devtable || true
 		done
 	fi
 
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 15 lines · Saul Wold

When doing an incremental image generation, ensure that makedevs returns true when it encounters a node that already exists, otherwise image generation will fail.

[YOCTO #5288]

---
  meta/classes/image.bbclass | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/image.bbclass +0 -0
index 7650594..463fa71 100644

meta/classes/image.bbclass fakeroot do_rootfs () { · line 340

Quoted 5 lines
meta/classes/image.bbclass +1 -1
@@ -337,7 +337,7 @@ fakeroot do_rootfs () {
  		for devtable in ${@get_devtable_list(d)}; do
  			# Always return ture since there maybe already one when use the
  			# incremental image generation
-			makedevs -r ${IMAGE_ROOTFS} -D $devtable
+			makedevs -r ${IMAGE_ROOTFS} -D $devtable || true

I'm a little worried about this patch. There is a known case where makedevs will fail with a message indicating it can't do the name -> uid/gid translations. In this case it just stops, and the nodes are never generated.

The underlying cause is that the passwd/group files never got installed onto the target. Adding a specific check for this might be a good idea, but doing the || true will cause errors like that to be masked.

Perhaps finding a way to patch makedevs to no error when a node already exists?

--Mark

Quoted 4 lines
meta/classes/image.bbclass +0 -0
  		done
  	fi