image.bbclass: remove tmp/rootfs after image creation unless you set a variable
PATCH 1/1 image.bbclass: remove tmp/rootfs after image creation unless you set a variable
Set IMAGE_KEEPROOTFS to something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed, as it's not a fully functional filesystem, and causes much confusion among users as a result.
--- classes/image.bbclass | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
classes/image.bbclass +1 -0
@@ -133,6 +133,7 @@ fakeroot do_rootfs () { ${IMAGE_POSTPROCESS_COMMAND} ${MACHINE_POSTPROCESS_COMMAND} + ${@['rm -rf ${IMAGE_ROOTFS}', ''][bool(d.getVar("IMAGE_KEEPROOTFS", 1))]} } do_deploy_to[nostamp] = "1"
Signature · 1 line
1.6.0
Quoted 6 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed, as it's not a fully functional filesystem, and causes much confusion among users as a result.Signed-off-by Chris Larson <[email protected]>
Signature · 1 line
Tom Rini
Dnia środa, 17 czerwca 2009 o 19:10:40 Chris Larson napisał(a):
Quoted 6 lines
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed, as it's not a fully functional filesystem, and causes much confusion among users as a result.Signed-off-by Chris Larson <[email protected]>
I am also tired of explaining to users why tmp/rootfs should not be used as nfsroot.
Regards,
Signature · 3 lines
JID: [email protected] Website: http://marcin.juszkiewicz.com.pl/ LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
Quoted 2 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed
We had something like this proposed a while ago by I think Lynn Lin. This is already a bit more evolved since it is conditional on a variable. The proposal then was rejected on the grounds of breaking concurrent builds and I think this will likely be the case here, too.
comments?
Quoted 5 lines · Rolf Leggewie
Quoted 2 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removedWe had something like this proposed a while ago by I think Lynn Lin.
I revisited that thread and it was actually about something else.
http://thread.gmane.org/gmane.comp.handhelds.openembedded/24434
My earlier comment does not apply.
Quoted 7 lines · Rolf Leggewie
Quoted 6 lines · Rolf Leggewie
Quoted 3 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed
Quoted 8 lines
Quoted 1 line
We had something like this proposed a while ago by I think Lynn Lin.
I revisited that thread and it was actually about something else.
http://thread.gmane.org/gmane.comp.handhelds.openembedded/24434
My earlier comment does not apply.
Pushed once it got acked a couple times :) Feel free to revert if there's a good reason to do s
o.
Signature · 7 lines
Chris Larson clarson at kergoth dot com clarson at mvista dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Software Engineer MontaVista Software, Inc.
Quoted 10 lines · On Среда 17 июня 2009 21:40:58 Rolf Leggewie wrote:
Quoted 2 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removedWe had something like this proposed a while ago by I think Lynn Lin. This is already a bit more evolved since it is conditional on a variable. The proposal then was rejected on the grounds of breaking concurrent builds and I think this will likely be the case here, too.
comments?
I think that was on 'tmp.gz' deletion and this one actually removes IMAGE_ROOTFS, not tmp/rootfs, so it should be fine.
Quoted 15 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed, as it's not a fully functional filesystem, and causes much confusion among users as a result.Signed-off-by Chris Larson <[email protected]>--- classes/image.bbclass | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)classes/image.bbclass +0
-0
classes/image.bbclass fakeroot do_rootfs () { · line 139
Quoted 7 lines
classes/image.bbclass +1
-0@@ -133,6 +133,7 @@ fakeroot do_rootfs () { ${IMAGE_POSTPROCESS_COMMAND} ${MACHINE_POSTPROCESS_COMMAND} + ${@['rm -rf ${IMAGE_ROOTFS}', ''][bool(d.getVar("IMAGE_KEEPROOTFS", 1))]} } do_deploy_to[nostamp] = "1"
Something I've been thinking about for a while is moving rootfs into ${WORKDIR}/. That way you can have concurrent image generation for a start and rm_work could be taught to clean it up...
Cheers,
Richard
Quoted 22 lines · Richard Purdie
Quoted 21 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed, as it's not a fully functional filesystem, and causes much confusion among users as a result.Signed-off-by Chris Larson <[email protected]>---
classes/image.bbclass | 1 +1 files changed, 1 insertions(+), 0 deletions(-)classes/image.bbclass +1
-0@@ -133,6 +133,7 @@ fakeroot do_rootfs () { ${IMAGE_POSTPROCESS_COMMAND} ${MACHINE_POSTPROCESS_COMMAND} + ${@['rm -rf ${IMAGE_ROOTFS}', ''][bool(d.getVar("IMAGE_KEEPROOTFS", 1))]} }
Quoted 5 lines
Quoted 1 line
do_deploy_to[nostamp] = "1"
Something I've been thinking about for a while is moving rootfs into ${WORKDIR}/. That way you can have concurrent image generation for a start and
rm_workcould be taught to clean it up...
That's a better way of doing it, indeed. In fact, someone suggested it on irc, and I promptly went and forgot about it :)
Signature · 7 lines
Chris Larson clarson at kergoth dot com clarson at mvista dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Software Engineer MontaVista Software, Inc.
Quoted 22 lines · Richard Purdie
Quoted 21 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep tmp/rootfs around after image creation, otherwise it will be removed, as it's not a fully functional filesystem, and causes much confusion among users as a result.Signed-off-by Chris Larson <[email protected]>--- classes/image.bbclass | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)classes/image.bbclass +1
-0@@ -133,6 +133,7 @@ fakeroot do_rootfs () { ${IMAGE_POSTPROCESS_COMMAND} ${MACHINE_POSTPROCESS_COMMAND} + ${@['rm -rf ${IMAGE_ROOTFS}', ''][bool(d.getVar("IMAGE_KEEPROOTFS", 1))]} }
Quoted 5 lines
classes/image.bbclass fakeroot do_rootfs () { · line 139
Quoted 1 line
classes/image.bbclass +0
-0do_deploy_to[nostamp] = "1"Something I've been thinking about for a while is moving rootfs into ${WORKDIR}/. That way you can have concurrent image generation for a start and
rm_workcould be taught to clean it up...
Isn't the other part of that the need to serialize making the package index files?
Signature · 1 line
Tom Rini
Quoted 7 lines · Tom Rini
Quoted 3 lines · Richard Purdie
Something I've been thinking about for a while is moving rootfs into ${WORKDIR}/. That way you can have concurrent image generation for a start and
rm_workcould be taught to clean it up...Isn't the other part of that the need to serialize making the package index files?
I thought we'd done that? If not we should, its not difficult as we have locking functions in bitbake.
Signature · 1 line
RP
Hello,
Quoted 2 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep
+1 for the idea, but "something other than the empty string" is a very bad user interface.
If users see:
IMAGE_KEEPROOTFS = "1"
in most cases they'll do:
IMAGE_KEEPROOTFS = "0"
instead of
#IMAGE_KEEPROOTFS = "1"
Do we have more of these?? It never occured to me before.
Regards
Signature · 1 line
Leon
Quoted 15 lines · Leon Woestenberg
Hello,
Quoted 2 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep+1 for the idea, but "something other than the empty string" is a very bad user interface.
If users see:
IMAGE_KEEPROOTFS= "1"in most cases they'll do:
Quoted 8 lines
IMAGE_KEEPROOTFS= "0"instead of
#IMAGE_KEEPROOTFS = "1"
Do we have more of these?? It never occured to me before.
We have this sort of thing all over the place. It needs an audit. Some vars expect set/empty, some expect 0/1, some expect yes/no, some just have a *convention* of yes/no.. afaik, anyway.
Signature · 5 lines
Chris Larson Software Engineer MontaVista Software, Inc. Email: clarson AT mvista DOT com Email: clarson AT kergoth DOT com
Quoted 7 lines · Leon Woestenberg
Hello,
If users see:
IMAGE_KEEPROOTFS= "1"in most cases they'll do:
Quoted 8 lines
IMAGE_KEEPROOTFS= "0"instead of
#IMAGE_KEEPROOTFS = "1"
Do we have more of these?? It never occured to me before.
Yeah, I made exactly this mistake with OE_STRICT_CHECKSUMS last week. Luckily, Mickey was on hand to put me straight, otherwise it would have been a frustrating experience.
p.
Quoted 15 lines · Leon Woestenberg
Hello,
Quoted 2 lines · Chris Larson
Set
IMAGE_KEEPROOTFSto something other than the empty string to keep+1 for the idea, but "something other than the empty string" is a very bad user interface.
If users see:
IMAGE_KEEPROOTFS= "1"in most cases they'll do:
Quoted 8 lines
IMAGE_KEEPROOTFS= "0"instead of
#IMAGE_KEEPROOTFS = "1"
Do we have more of these?? It never occured to me before.
Over the past day or so I've been thinking about putting together a proof of concept variable type checking .inc. Something like:
IMAGE_KEEPROOTFS ?= "0"
IMAGE_KEEPROOTFS[type] = "bool"
Then it would freak if it's not set to something valid for that type. It wouldn't be hard to throw such a thing together.
Signature · 7 lines
Chris Larson clarson at kergoth dot com clarson at mvista dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Software Engineer MontaVista Software, Inc.