* [PATCH] image: Handle image types containing '-' correctly
@ 2016-01-17 22:25 Richard Purdie
2016-01-18 0:34 ` Jonathan Liu
0 siblings, 1 reply; 2+ messages in thread
From: Richard Purdie @ 2016-01-17 22:25 UTC (permalink / raw)
To: openembedded-core
Shell function names can't contain '-' characters, which means our image
task names also can't. Add some mapping to use '_' instead of the '-' so
images like "rpi-sdimg" work again.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
index 58b75da..e81edb2 100644
--- a/meta/classes/image.bbclass
+++ b/meta/classes/image.bbclass
@@ -393,6 +393,12 @@ python () {
else:
subimages.append(realt)
+ after = 'do_image'
+ for dep in typedeps[t]:
+ after += ' do_image_%s' % dep.replace("-", "_")
+
+ t = t.replace("-", "_")
+
d.setVar('do_image_%s' % t, '\n'.join(cmds))
d.setVarFlag('do_image_%s' % t, 'func', '1')
d.setVarFlag('do_image_%s' % t, 'fakeroot', '1')
@@ -402,10 +408,6 @@ python () {
d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
- after = 'do_image'
- for dep in typedeps[t]:
- after += ' do_image_%s' % dep
-
bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after))
bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] image: Handle image types containing '-' correctly
2016-01-17 22:25 [PATCH] image: Handle image types containing '-' correctly Richard Purdie
@ 2016-01-18 0:34 ` Jonathan Liu
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Liu @ 2016-01-18 0:34 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
Hi Richard,
On 18 January 2016 at 09:25, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> Shell function names can't contain '-' characters, which means our image
> task names also can't. Add some mapping to use '_' instead of the '-' so
> images like "rpi-sdimg" work again.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 58b75da..e81edb2 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -393,6 +393,12 @@ python () {
> else:
> subimages.append(realt)
>
> + after = 'do_image'
> + for dep in typedeps[t]:
> + after += ' do_image_%s' % dep.replace("-", "_")
> +
> + t = t.replace("-", "_")
> +
> d.setVar('do_image_%s' % t, '\n'.join(cmds))
> d.setVarFlag('do_image_%s' % t, 'func', '1')
> d.setVarFlag('do_image_%s' % t, 'fakeroot', '1')
> @@ -402,10 +408,6 @@ python () {
> d.appendVarFlag('do_image_%s' % t, 'vardeps', ' '.join(vardeps))
> d.appendVarFlag('do_image_%s' % t, 'vardepsexclude', 'DATETIME')
>
> - after = 'do_image'
> - for dep in typedeps[t]:
> - after += ' do_image_%s' % dep
> -
> bb.debug(2, "Adding type %s before %s, after %s" % (t, 'do_image_complete', after))
> bb.build.addtask('do_image_%s' % t, 'do_image_complete', after, d)
> }
>
>
This fixes building Raspberry Pi 2 SD images for me. I have the tested
patch and it is working.
Signed-off-by: Jonathan Liu <net147@gmail.com>
Regards,
Jonathan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-18 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-17 22:25 [PATCH] image: Handle image types containing '-' correctly Richard Purdie
2016-01-18 0:34 ` Jonathan Liu
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.