* [PATCH] lib/oe/image.py: fix working directory
@ 2014-02-17 10:46 Jonathan Liu
2014-02-18 8:41 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Liu @ 2014-02-17 10:46 UTC (permalink / raw)
To: openembedded-core
The working directory needs to be changed before the image creation
commands instead of afterwards.
Signed-off-by: Jonathan Liu <net147@gmail.com>
---
meta/lib/oe/image.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index c15296f..31193f2 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -176,8 +176,8 @@ class Image(object):
bb.data.update_data(localdata)
localdata.setVar('type', type)
- cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
+ cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
if type in cimages:
for ctype in cimages[type]:
--
1.8.5.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/oe/image.py: fix working directory
2014-02-17 10:46 [PATCH] lib/oe/image.py: fix working directory Jonathan Liu
@ 2014-02-18 8:41 ` Richard Purdie
2014-02-18 8:55 ` Jonathan Liu
0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2014-02-18 8:41 UTC (permalink / raw)
To: Jonathan Liu; +Cc: openembedded-core
On Mon, 2014-02-17 at 21:46 +1100, Jonathan Liu wrote:
> The working directory needs to be changed before the image creation
> commands instead of afterwards.
>
> Signed-off-by: Jonathan Liu <net147@gmail.com>
> ---
> meta/lib/oe/image.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
> index c15296f..31193f2 100644
> --- a/meta/lib/oe/image.py
> +++ b/meta/lib/oe/image.py
> @@ -176,8 +176,8 @@ class Image(object):
> bb.data.update_data(localdata)
> localdata.setVar('type', type)
>
> - cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
> cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
> + cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
>
> if type in cimages:
> for ctype in cimages[type]:
I applied this but ended up reverting it since its clear the image
commands assume a different working directory and this causes failures.
I'd like to see more explanation about the problem this is trying to
solve.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/oe/image.py: fix working directory
2014-02-18 8:41 ` Richard Purdie
@ 2014-02-18 8:55 ` Jonathan Liu
2014-02-18 9:11 ` Jonathan Liu
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Liu @ 2014-02-18 8:55 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On 18/02/2014 7:41 PM, Richard Purdie wrote:
> On Mon, 2014-02-17 at 21:46 +1100, Jonathan Liu wrote:
>> The working directory needs to be changed before the image creation
>> commands instead of afterwards.
>>
>> Signed-off-by: Jonathan Liu <net147@gmail.com>
>> ---
>> meta/lib/oe/image.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
>> index c15296f..31193f2 100644
>> --- a/meta/lib/oe/image.py
>> +++ b/meta/lib/oe/image.py
>> @@ -176,8 +176,8 @@ class Image(object):
>> bb.data.update_data(localdata)
>> localdata.setVar('type', type)
>>
>> - cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
>> cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
>> + cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
>>
>> if type in cimages:
>> for ctype in cimages[type]:
> I applied this but ended up reverting it since its clear the image
> commands assume a different working directory and this causes failures.
>
> I'd like to see more explanation about the problem this is trying to
> solve.
>
> Cheers,
>
> Richard
>
The sdimg image classes in meta-raspberrypi and meta-sunxi broke when I
switched from dora to master branch.
See:
https://github.com/djwillis/meta-raspberrypi/blob/master/classes/sdcard_image-rpi.bbclass#L43
It is using relative path to rootfs which assumes the working directory
is DEPLOY_DIR_IMAGE.
I was able to build the SD card images fine after the fix.
Regards,
Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/oe/image.py: fix working directory
2014-02-18 8:55 ` Jonathan Liu
@ 2014-02-18 9:11 ` Jonathan Liu
2014-02-18 9:55 ` Richard Purdie
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Liu @ 2014-02-18 9:11 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On 18/02/2014 7:55 PM, Jonathan Liu wrote:
> On 18/02/2014 7:41 PM, Richard Purdie wrote:
>> On Mon, 2014-02-17 at 21:46 +1100, Jonathan Liu wrote:
>>> The working directory needs to be changed before the image creation
>>> commands instead of afterwards.
>>>
>>> Signed-off-by: Jonathan Liu <net147@gmail.com>
>>> ---
>>> meta/lib/oe/image.py | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
>>> index c15296f..31193f2 100644
>>> --- a/meta/lib/oe/image.py
>>> +++ b/meta/lib/oe/image.py
>>> @@ -176,8 +176,8 @@ class Image(object):
>>> bb.data.update_data(localdata)
>>> localdata.setVar('type', type)
>>> - cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
>>> cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
>>> + cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
>>> if type in cimages:
>>> for ctype in cimages[type]:
>> I applied this but ended up reverting it since its clear the image
>> commands assume a different working directory and this causes failures.
>>
>> I'd like to see more explanation about the problem this is trying to
>> solve.
>>
>> Cheers,
>>
>> Richard
>>
> The sdimg image classes in meta-raspberrypi and meta-sunxi broke when
> I switched from dora to master branch.
> See:
> https://github.com/djwillis/meta-raspberrypi/blob/master/classes/sdcard_image-rpi.bbclass#L43
> It is using relative path to rootfs which assumes the working
> directory is DEPLOY_DIR_IMAGE.
> I was able to build the SD card images fine after the fix.
Also, it makes absolutely no sense whatsoever to change working
directory at the end of the function:
img_creation_func() {
oe_mkext234fs ext4 -i 8192
cd /home/build/poky/build/tmp/deploy/images/qemux86
}
...
img_creation_func
This would mean the last command executed in create_image.ext4 (see temp
folder for image recipe) would be changing the directory.
>
> Regards,
> Jonathan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] lib/oe/image.py: fix working directory
2014-02-18 9:11 ` Jonathan Liu
@ 2014-02-18 9:55 ` Richard Purdie
0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2014-02-18 9:55 UTC (permalink / raw)
To: Jonathan Liu; +Cc: openembedded-core
On Tue, 2014-02-18 at 20:11 +1100, Jonathan Liu wrote:
> On 18/02/2014 7:55 PM, Jonathan Liu wrote:
> > On 18/02/2014 7:41 PM, Richard Purdie wrote:
> >> On Mon, 2014-02-17 at 21:46 +1100, Jonathan Liu wrote:
> >>> The working directory needs to be changed before the image creation
> >>> commands instead of afterwards.
> >>>
> >>> Signed-off-by: Jonathan Liu <net147@gmail.com>
> >>> ---
> >>> meta/lib/oe/image.py | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
> >>> index c15296f..31193f2 100644
> >>> --- a/meta/lib/oe/image.py
> >>> +++ b/meta/lib/oe/image.py
> >>> @@ -176,8 +176,8 @@ class Image(object):
> >>> bb.data.update_data(localdata)
> >>> localdata.setVar('type', type)
> >>> - cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
> >>> cmds.append(localdata.expand("\tcd ${DEPLOY_DIR_IMAGE}"))
> >>> + cmds.append("\t" + localdata.getVar("IMAGE_CMD", True))
> >>> if type in cimages:
> >>> for ctype in cimages[type]:
> >> I applied this but ended up reverting it since its clear the image
> >> commands assume a different working directory and this causes failures.
> >>
> >> I'd like to see more explanation about the problem this is trying to
> >> solve.
> >>
> >> Cheers,
> >>
> >> Richard
> >>
> > The sdimg image classes in meta-raspberrypi and meta-sunxi broke when
> > I switched from dora to master branch.
> > See:
> > https://github.com/djwillis/meta-raspberrypi/blob/master/classes/sdcard_image-rpi.bbclass#L43
> > It is using relative path to rootfs which assumes the working
> > directory is DEPLOY_DIR_IMAGE.
> > I was able to build the SD card images fine after the fix.
> Also, it makes absolutely no sense whatsoever to change working
> directory at the end of the function:
> img_creation_func() {
> oe_mkext234fs ext4 -i 8192
> cd /home/build/poky/build/tmp/deploy/images/qemux86
> }
>
> ...
>
> img_creation_func
>
> This would mean the last command executed in create_image.ext4 (see temp
> folder for image recipe) would be changing the directory.
Its being done for the compression code that immediately follows it. So
it does make sense and its why changing it broke things.
Cheers,
Richard
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-18 9:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-17 10:46 [PATCH] lib/oe/image.py: fix working directory Jonathan Liu
2014-02-18 8:41 ` Richard Purdie
2014-02-18 8:55 ` Jonathan Liu
2014-02-18 9:11 ` Jonathan Liu
2014-02-18 9:55 ` Richard Purdie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox