* [PATCH] archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs
@ 2013-05-03 9:01 Laurentiu Palcu
2013-05-03 21:40 ` Kevin Strasser
0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu Palcu @ 2013-05-03 9:01 UTC (permalink / raw)
To: openembedded-core
do_rootfs[cleandirs] contains ${S} and, if do_rootfs task starts before
the do_dumpdata_create_diff_gz is finished, an error will occur in the
process because the directory will be removed while still needed by the
create_diff_gz() function.
This patch will force the do_dumpdata_create_diff_gz task to run before
do_rootfs when the final image is created.
[YOCTO #4310]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
---
meta/classes/archive-configured-source.bbclass | 2 +-
meta/classes/archive-original-source.bbclass | 2 +-
meta/classes/archive-patched-source.bbclass | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
index d346f69..a481b14 100644
--- a/meta/classes/archive-configured-source.bbclass
+++ b/meta/classes/archive-configured-source.bbclass
@@ -14,7 +14,7 @@ addtask do_archive_configured_sources after do_configure
addtask do_archive_scripts_logs
# Get dump date and create diff file
-addtask do_dumpdata_create_diff_gz
+addtask do_dumpdata_create_diff_gz before do_rootfs
python () {
pn = d.getVar('PN', True)
diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass
index 7258293..2796ff9 100644
--- a/meta/classes/archive-original-source.bbclass
+++ b/meta/classes/archive-original-source.bbclass
@@ -14,7 +14,7 @@ addtask do_archive_original_sources_patches after do_unpack
addtask do_archive_scripts_logs
# Get dump date and create diff file
-addtask do_dumpdata_create_diff_gz
+addtask do_dumpdata_create_diff_gz before do_rootfs
python () {
pn = d.getVar('PN', True)
diff --git a/meta/classes/archive-patched-source.bbclass b/meta/classes/archive-patched-source.bbclass
index 9e5ec74..995a259 100644
--- a/meta/classes/archive-patched-source.bbclass
+++ b/meta/classes/archive-patched-source.bbclass
@@ -14,7 +14,7 @@ addtask do_archive_patched_sources after do_patch
addtask do_archive_scripts_logs
# Get dump date and create diff file
-addtask do_dumpdata_create_diff_gz
+addtask do_dumpdata_create_diff_gz before do_rootfs
python () {
pn = d.getVar('PN', True)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs
2013-05-03 9:01 [PATCH] archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs Laurentiu Palcu
@ 2013-05-03 21:40 ` Kevin Strasser
2013-05-07 9:31 ` Laurentiu Palcu
0 siblings, 1 reply; 4+ messages in thread
From: Kevin Strasser @ 2013-05-03 21:40 UTC (permalink / raw)
To: Laurentiu Palcu; +Cc: openembedded-core
Hi Laurentiu,
On Fri, May 03, 2013 at 12:01:04PM +0300, Laurentiu Palcu wrote:
> do_rootfs[cleandirs] contains ${S} and, if do_rootfs task starts before
> the do_dumpdata_create_diff_gz is finished, an error will occur in the
> process because the directory will be removed while still needed by the
> create_diff_gz() function.
>
> This patch will force the do_dumpdata_create_diff_gz task to run before
> do_rootfs when the final image is created.
>
> [YOCTO #4310]
>
> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
> ---
> meta/classes/archive-configured-source.bbclass | 2 +-
> meta/classes/archive-original-source.bbclass | 2 +-
> meta/classes/archive-patched-source.bbclass | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
> index d346f69..a481b14 100644
> --- a/meta/classes/archive-configured-source.bbclass
> +++ b/meta/classes/archive-configured-source.bbclass
> @@ -14,7 +14,7 @@ addtask do_archive_configured_sources after do_configure
> addtask do_archive_scripts_logs
>
> # Get dump date and create diff file
> -addtask do_dumpdata_create_diff_gz
> +addtask do_dumpdata_create_diff_gz before do_rootfs
This will always add the task to the build, and break our ability to
filter out packages. I would suggest handling this dependency in the
anonymous python function after filtering has been applied.
>
> python () {
> pn = d.getVar('PN', True)
> diff --git a/meta/classes/archive-original-source.bbclass b/meta/classes/archive-original-source.bbclass
> index 7258293..2796ff9 100644
> --- a/meta/classes/archive-original-source.bbclass
> +++ b/meta/classes/archive-original-source.bbclass
> @@ -14,7 +14,7 @@ addtask do_archive_original_sources_patches after do_unpack
> addtask do_archive_scripts_logs
>
> # Get dump date and create diff file
> -addtask do_dumpdata_create_diff_gz
> +addtask do_dumpdata_create_diff_gz before do_rootfs
ditto
>
> python () {
> pn = d.getVar('PN', True)
> diff --git a/meta/classes/archive-patched-source.bbclass b/meta/classes/archive-patched-source.bbclass
> index 9e5ec74..995a259 100644
> --- a/meta/classes/archive-patched-source.bbclass
> +++ b/meta/classes/archive-patched-source.bbclass
> @@ -14,7 +14,7 @@ addtask do_archive_patched_sources after do_patch
> addtask do_archive_scripts_logs
>
> # Get dump date and create diff file
> -addtask do_dumpdata_create_diff_gz
> +addtask do_dumpdata_create_diff_gz before do_rootfs
ditto
Thanks,
Kevin
>
> python () {
> pn = d.getVar('PN', True)
> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs
2013-05-03 21:40 ` Kevin Strasser
@ 2013-05-07 9:31 ` Laurentiu Palcu
2013-05-07 11:04 ` Laurentiu Palcu
0 siblings, 1 reply; 4+ messages in thread
From: Laurentiu Palcu @ 2013-05-07 9:31 UTC (permalink / raw)
To: Kevin Strasser; +Cc: openembedded-core
Hi Kevin,
On 05/04/2013 12:40 AM, Kevin Strasser wrote:
> Hi Laurentiu,
>
> On Fri, May 03, 2013 at 12:01:04PM +0300, Laurentiu Palcu wrote:
>> > do_rootfs[cleandirs] contains ${S} and, if do_rootfs task starts before
>> > the do_dumpdata_create_diff_gz is finished, an error will occur in the
>> > process because the directory will be removed while still needed by the
>> > create_diff_gz() function.
>> >
>> > This patch will force the do_dumpdata_create_diff_gz task to run before
>> > do_rootfs when the final image is created.
>> >
>> > [YOCTO #4310]
>> >
>> > Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
>> > ---
>> > meta/classes/archive-configured-source.bbclass | 2 +-
>> > meta/classes/archive-original-source.bbclass | 2 +-
>> > meta/classes/archive-patched-source.bbclass | 2 +-
>> > 3 files changed, 3 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
>> > index d346f69..a481b14 100644
>> > --- a/meta/classes/archive-configured-source.bbclass
>> > +++ b/meta/classes/archive-configured-source.bbclass
>> > @@ -14,7 +14,7 @@ addtask do_archive_configured_sources after do_configure
>> > addtask do_archive_scripts_logs
>> >
>> > # Get dump date and create diff file
>> > -addtask do_dumpdata_create_diff_gz
>> > +addtask do_dumpdata_create_diff_gz before do_rootfs
> This will always add the task to the build, and break our ability to
> filter out packages. I would suggest handling this dependency in the
> anonymous python function after filtering has been applied.
AFAIK, the 'before do_rootfs' doesn't add the task to the build. It
actually forces the task to be run before do_rootfs. I have just tested
this with ARCHIVER_MODE[filter] set to both "no" and "yes" and playing
with COPYLEFT_LICENSE_INCLUDE and COPYLEFT_LICENSE_EXCLUDE. It seeems to
produce the desired effect.
However, and this might be an issue but I'm not sure if this is the
desired behavior(I have to dig in a little), changing
ARCHIVER_MODE[filter] in local.conf does not trigger a recipe reparsing
and you might not see the effect you're expecting. Try removing the
tmp/cache first.
Thanks,
Laurentiu
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs
2013-05-07 9:31 ` Laurentiu Palcu
@ 2013-05-07 11:04 ` Laurentiu Palcu
0 siblings, 0 replies; 4+ messages in thread
From: Laurentiu Palcu @ 2013-05-07 11:04 UTC (permalink / raw)
To: Kevin Strasser; +Cc: openembedded-core
On 05/07/2013 12:31 PM, Laurentiu Palcu wrote:
> Hi Kevin,
>
> On 05/04/2013 12:40 AM, Kevin Strasser wrote:
>> Hi Laurentiu,
>>
>> On Fri, May 03, 2013 at 12:01:04PM +0300, Laurentiu Palcu wrote:
>>>> do_rootfs[cleandirs] contains ${S} and, if do_rootfs task starts before
>>>> the do_dumpdata_create_diff_gz is finished, an error will occur in the
>>>> process because the directory will be removed while still needed by the
>>>> create_diff_gz() function.
>>>>
>>>> This patch will force the do_dumpdata_create_diff_gz task to run before
>>>> do_rootfs when the final image is created.
>>>>
>>>> [YOCTO #4310]
>>>>
>>>> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
>>>> ---
>>>> meta/classes/archive-configured-source.bbclass | 2 +-
>>>> meta/classes/archive-original-source.bbclass | 2 +-
>>>> meta/classes/archive-patched-source.bbclass | 2 +-
>>>> 3 files changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
>>>> index d346f69..a481b14 100644
>>>> --- a/meta/classes/archive-configured-source.bbclass
>>>> +++ b/meta/classes/archive-configured-source.bbclass
>>>> @@ -14,7 +14,7 @@ addtask do_archive_configured_sources after do_configure
>>>> addtask do_archive_scripts_logs
>>>>
>>>> # Get dump date and create diff file
>>>> -addtask do_dumpdata_create_diff_gz
>>>> +addtask do_dumpdata_create_diff_gz before do_rootfs
>> This will always add the task to the build, and break our ability to
>> filter out packages. I would suggest handling this dependency in the
>> anonymous python function after filtering has been applied.
Indeed, after adding MIT to COPYLEFT_LICENSE_EXCLUDE, the task is still
added as a dependency to the image's do_rootfs... I'll try a fix this in
the anonymous python function.
Thanks,
Laurentiu
> AFAIK, the 'before do_rootfs' doesn't add the task to the build. It
> actually forces the task to be run before do_rootfs. I have just tested
> this with ARCHIVER_MODE[filter] set to both "no" and "yes" and playing
> with COPYLEFT_LICENSE_INCLUDE and COPYLEFT_LICENSE_EXCLUDE. It seeems to
> produce the desired effect.
>
> However, and this might be an issue but I'm not sure if this is the
> desired behavior(I have to dig in a little), changing
> ARCHIVER_MODE[filter] in local.conf does not trigger a recipe reparsing
> and you might not see the effect you're expecting. Try removing the
> tmp/cache first.
>
> Thanks,
> Laurentiu
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-07 11:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-03 9:01 [PATCH] archive-*-source.bbclass: have do_dumpdata_create_diff_gz task run before do_rootfs Laurentiu Palcu
2013-05-03 21:40 ` Kevin Strasser
2013-05-07 9:31 ` Laurentiu Palcu
2013-05-07 11:04 ` Laurentiu Palcu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox