meta: handle IMAGE_ROOTFS/IMGDEPLOYDIR by task varflags
PATCH 1/1 meta: handle IMAGE_ROOTFS/IMGDEPLOYDIR by task varflags
From: Ming Liu <[email protected]>
I found a issue that sometimes there are leftovers in IMAGE_ROOTFS that are generated by the previous builds. I think this is caused by IMAGE_ROOTFS is not in do_rootfs[cleandirs], so add it in.
IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some code in rootfs.py to generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories could be removed.
--- meta/classes/image.bbclass | 4 ++-- meta/lib/oe/rootfs.py | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-)
meta/classes/image.bbclass +2 -2
@@ -251,8 +251,8 @@ fakeroot python do_rootfs () { progress_reporter.finish() } -do_rootfs[dirs] = "${TOPDIR}" -do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}" +do_rootfs[dirs] = "${IMAGE_ROOTFS} ${IMGDEPLOYDIR} ${TOPDIR}" +do_rootfs[cleandirs] += "${S} ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}" do_rootfs[umask] = "022" do_rootfs[file-checksums] += "${POSTINST_INTERCEPT_CHECKSUMS}" addtask rootfs after do_prepare_recipe_sysroot
meta/lib/oe/rootfs.py +0 -5
@@ -19,7 +19,6 @@ class Rootfs(object, metaclass=ABCMeta): self.d = d self.pm = None self.image_rootfs = self.d.getVar('IMAGE_ROOTFS') - self.deploydir = self.d.getVar('IMGDEPLOYDIR') self.progress_reporter = progress_reporter self.logcatcher = logcatcher
@@ -188,10 +187,6 @@ class Rootfs(object, metaclass=ABCMeta): post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND") rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND') - bb.utils.mkdirhier(self.image_rootfs) - - bb.utils.mkdirhier(self.deploydir) - execute_pre_post_process(self.d, pre_process_cmds) if self.progress_reporter:
Signature · 1 line
2.7.4
Quoted 21 lines · On 1/6/19 7:54 AM, [email protected] wrote:
From: Ming Liu <[email protected]>
I found a issue that sometimes there are leftovers in
IMAGE_ROOTFSthat are generated by the previous builds. I think this is caused byIMAGE_ROOTFSis not in do_rootfs[cleandirs], so add it in.IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some code in
rootfs.pyto generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories could be removed.Signed-off-by Ming Liu <[email protected]>--- meta/classes/image.bbclass | 4 ++-- meta/lib/oe/rootfs.py | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-)meta/classes/image.bbclass +0
-0
meta/classes/image.bbclass fakeroot python do_rootfs () { · line 255
Quoted 7 lines
meta/classes/image.bbclass +2
-2@@ -251,8 +251,8 @@ fakeroot python do_rootfs () { progress_reporter.finish() } -do_rootfs[dirs] = "${TOPDIR}" -do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}" +do_rootfs[dirs] = "${IMAGE_ROOTFS} ${IMGDEPLOYDIR} ${TOPDIR}" +do_rootfs[cleandirs] += "${S} ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}"
would it mean no incremental rootfs creation ? meaning it will generate full rootfs from scratch every time
Quoted 27 lines
meta/classes/image.bbclass +0
-0do_rootfs[umask] = "022" do_rootfs[file-checksums] += "${POSTINST_INTERCEPT_CHECKSUMS}" addtask rootfs after do_prepare_recipe_sysrootmeta/lib/oe/rootfs.py +0
-5@@ -19,7 +19,6 @@ class Rootfs(object, metaclass=ABCMeta): self.d = d self.pm = None self.image_rootfs = self.d.getVar('IMAGE_ROOTFS') - self.deploydir = self.d.getVar('IMGDEPLOYDIR') self.progress_reporter = progress_reporter self.logcatcher = logcatcher@@ -188,10 +187,6 @@ class Rootfs(object, metaclass=ABCMeta): post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND") rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND') - bb.utils.mkdirhier(self.image_rootfs) - - bb.utils.mkdirhier(self.deploydir) - execute_pre_post_process(self.d, pre_process_cmds) if self.progress_reporter:
Hi, Khem:
Arha, I think you are right, I did not noticed its impact to incremental build, will send a V2 soon.
//Ming Liu
Khem Raj <[email protected]> 於 2019年1月6日 週日 下午5:00寫道:
Quoted 64 lines · On 1/6/19 7:54 AM, [email protected] wrote:
Quoted 21 lines
From: Ming Liu <[email protected]>
I found a issue that sometimes there are leftovers in
IMAGE_ROOTFSthat are generated by the previous builds. I think this is caused byIMAGE_ROOTFSis not in do_rootfs[cleandirs], so add it in.IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some code in
rootfs.pyto generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories could be removed.Signed-off-by Ming Liu <[email protected]>--- meta/classes/image.bbclass | 4 ++-- meta/lib/oe/rootfs.py | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-)meta/classes/image.bbclass +0
-0meta/classes/image.bbclass fakeroot python do_rootfs () { · line 255
Quoted 7 lines
meta/classes/image.bbclass +2
-2@@ -251,8 +251,8 @@ fakeroot python do_rootfs () { progress_reporter.finish() } -do_rootfs[dirs] = "${TOPDIR}" -do_rootfs[cleandirs] += "${S} ${IMGDEPLOYDIR}" +do_rootfs[dirs] = "${IMAGE_ROOTFS} ${IMGDEPLOYDIR} ${TOPDIR}" +do_rootfs[cleandirs] += "${S} ${IMAGE_ROOTFS} ${IMGDEPLOYDIR}"would it mean no incremental rootfs creation ? meaning it will generate full rootfs from scratch every time
Quoted 16 lines
meta/classes/image.bbclass +0
-0do_rootfs[umask] = "022" do_rootfs[file-checksums] += "${POSTINST_INTERCEPT_CHECKSUMS}" addtask rootfs after do_prepare_recipe_sysrootmeta/lib/oe/rootfs.py +0
-1@@ -19,7 +19,6 @@ class Rootfs(object, metaclass=ABCMeta): self.d = d self.pm = None self.image_rootfs = self.d.getVar('IMAGE_ROOTFS') - self.deploydir = self.d.getVar('IMGDEPLOYDIR') self.progress_reporter = progress_reporter self.logcatcher = logcatchermeta/lib/oe/rootfs.py class Rootfs(object, metaclass=ABCMeta): · line 188
Quoted 2 lines
meta/lib/oe/rootfs.py +0
-0@@ -188,10 +187,6 @@ class Rootfs(object, metaclass=ABCMeta): post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND") rootfs_post_install_cmds =
self.d.getVar('ROOTFS_POSTINSTALL_COMMAND')Quoted 9 lines
meta/lib/oe/rootfs.py +0
-4- bb.utils.mkdirhier(self.image_rootfs) - - bb.utils.mkdirhier(self.deploydir) - execute_pre_post_process(self.d, pre_process_cmds) if self.progress_reporter: