* [meta-swupd][PATCH] swupdimage.bbclass: ensure that do_rootfs gets executed
@ 2016-09-12 7:09 Patrick Ohly
2016-09-12 7:39 ` Patrick Ohly
2016-09-12 11:57 ` Lock, Joshua G
0 siblings, 2 replies; 3+ messages in thread
From: Patrick Ohly @ 2016-09-12 7:09 UTC (permalink / raw)
To: yocto; +Cc: joshua.g.lock
OE-core commit 6d969bacc718e changed do_rootfs so that it creates
IMGDEPLOYDIR. That change broke the creation of additional swupd
images, because setting do_rootfs to empty caused the entire task to
be skipped, including the evaluation of the 'cleandirs' task
attribute.
It remains to be seen whether that's really the desired behavior (see
https://bugzilla.yoctoproject.org/show_bug.cgi?id=10256), but as it is
what it is right now, we need to avoid the situation by overwriting
do_rootfs with non-empty code that doesn't do anything. That way, the
directory gets created.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
classes/swupdimage.bbclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/classes/swupdimage.bbclass b/classes/swupdimage.bbclass
index 20bd4c8..56aa60a 100644
--- a/classes/swupdimage.bbclass
+++ b/classes/swupdimage.bbclass
@@ -48,7 +48,11 @@ python swupdimage_virtclass_handler () {
e.data.setVar("IMAGE_BUNDLE_NAME", imageext)
# We override the default methods such that they only copy from the mega rootfs.
e.data.setVar("do_image", " import swupd.rootfs\n swupd.rootfs.create_rootfs(d)\n")
- e.data.setVar("do_rootfs", "")
+ # do_rootfs must not be empty, because empty tasks get skipped
+ # and we don't want that for do_rootfs because its cleandirs
+ # variable triggers the creation of the IMGDEPLOYDIR that we
+ # are going to write into.
+ e.data.setVar("do_rootfs", " pass")
# Depend on complete bundle generation in the base image.
dep = ' %s:do_stage_swupd_inputs' % pn_base
e.data.appendVarFlag('do_image', 'depends', dep)
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-swupd][PATCH] swupdimage.bbclass: ensure that do_rootfs gets executed
2016-09-12 7:09 [meta-swupd][PATCH] swupdimage.bbclass: ensure that do_rootfs gets executed Patrick Ohly
@ 2016-09-12 7:39 ` Patrick Ohly
2016-09-12 11:57 ` Lock, Joshua G
1 sibling, 0 replies; 3+ messages in thread
From: Patrick Ohly @ 2016-09-12 7:39 UTC (permalink / raw)
To: yocto; +Cc: joshua.g.lock, Mikko Ylinen
Hello Joshua!
Please also apply to the pre-sstate branch. There's a slight merge
conflict (previous line differs), but that's easy to resolve, so I am
not sending that as a separate patch.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-swupd][PATCH] swupdimage.bbclass: ensure that do_rootfs gets executed
2016-09-12 7:09 [meta-swupd][PATCH] swupdimage.bbclass: ensure that do_rootfs gets executed Patrick Ohly
2016-09-12 7:39 ` Patrick Ohly
@ 2016-09-12 11:57 ` Lock, Joshua G
1 sibling, 0 replies; 3+ messages in thread
From: Lock, Joshua G @ 2016-09-12 11:57 UTC (permalink / raw)
To: Ohly, Patrick, yocto@yoctoproject.org
On Mon, 2016-09-12 at 09:09 +0200, Patrick Ohly wrote:
> OE-core commit 6d969bacc718e changed do_rootfs so that it creates
> IMGDEPLOYDIR. That change broke the creation of additional swupd
> images, because setting do_rootfs to empty caused the entire task to
> be skipped, including the evaluation of the 'cleandirs' task
> attribute.
>
> It remains to be seen whether that's really the desired behavior (see
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=10256), but as it
> is
> what it is right now, we need to avoid the situation by overwriting
> do_rootfs with non-empty code that doesn't do anything. That way, the
> directory gets created.
Pushed to master (and presstate). Thanks!
Joshua
>
> Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
> ---
> classes/swupdimage.bbclass | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/classes/swupdimage.bbclass b/classes/swupdimage.bbclass
> index 20bd4c8..56aa60a 100644
> --- a/classes/swupdimage.bbclass
> +++ b/classes/swupdimage.bbclass
> @@ -48,7 +48,11 @@ python swupdimage_virtclass_handler () {
> e.data.setVar("IMAGE_BUNDLE_NAME", imageext)
> # We override the default methods such that they only copy from
> the mega rootfs.
> e.data.setVar("do_image", " import
> swupd.rootfs\n swupd.rootfs.create_rootfs(d)\n")
> - e.data.setVar("do_rootfs", "")
> + # do_rootfs must not be empty, because empty tasks get skipped
> + # and we don't want that for do_rootfs because its cleandirs
> + # variable triggers the creation of the IMGDEPLOYDIR that we
> + # are going to write into.
> + e.data.setVar("do_rootfs", " pass")
> # Depend on complete bundle generation in the base image.
> dep = ' %s:do_stage_swupd_inputs' % pn_base
> e.data.appendVarFlag('do_image', 'depends', dep)
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-12 11:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-12 7:09 [meta-swupd][PATCH] swupdimage.bbclass: ensure that do_rootfs gets executed Patrick Ohly
2016-09-12 7:39 ` Patrick Ohly
2016-09-12 11:57 ` Lock, Joshua G
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.