[OE-core] [PATCH 2/2 v2] archive-*-source.bbclass: Handle all package classes

Richard Purdie richard.purdie at linuxfoundation.org
Wed Jan 16 11:48:49 UTC 2013


On Mon, 2013-01-14 at 18:48 +0500, Shakeel, Muhammad wrote:
> From: Muhammad Shakeel <muhammad_shakeel at mentor.com>
> 
> * Add archiver tasks correctly for any 'IMAGE_PKGTYPE'.
> 
> [YOCTO #3449]
> 
> Signed-off-by: Muhammad Shakeel <muhammad_shakeel at mentor.com>
> Signed-off-by: Noor Ahsan <noor_ahsan at mentor.com>
> Signed-off-by: Christopher Larson <chris_larson at mentor.com>
> ---
>  meta/classes/archive-configured-source.bbclass |   15 +++++++++++++--
>  meta/classes/archive-original-source.bbclass   |   15 +++++++++++++--
>  meta/classes/archive-patched-source.bbclass    |   15 +++++++++++++--
>  3 files changed, 39 insertions(+), 6 deletions(-)
> 
> diff --git a/meta/classes/archive-configured-source.bbclass b/meta/classes/archive-configured-source.bbclass
> index 64799e3..50838e6 100644
> --- a/meta/classes/archive-configured-source.bbclass
> +++ b/meta/classes/archive-configured-source.bbclass
> @@ -11,12 +11,19 @@ inherit archiver
>  addtask do_archive_configured_sources after do_configure
>  
>  # Get archiving package with temp(logs) and scripts(.bb and inc files)
> -addtask do_archive_scripts_logs after do_package_write_rpm
> +addtask do_archive_scripts_logs
>  
>  # Get dump date and create diff file 
> -addtask do_dumpdata_create_diff_gz after do_package_write_rpm before do_build
> +addtask do_dumpdata_create_diff_gz before do_build
>  
>  python () {
> +    packaging = d.getVar('IMAGE_PKGTYPE', True)
> +    write_package_task = 'do_package_write_' + packaging
> +
> +    deps = d.getVarFlag('do_dumpdata_create_diff_gz', 'deps') or []
> +    deps.append(write_package_task)
> +    d.setVarFlag('do_dumpdata_create_diff_gz', 'deps', deps)
> +
>      if d.getVar('SOURCE_ARCHIVE_PACKAGE_TYPE', True) != 'srpm':
>          """
>          If package type is not 'srpm' then add tasks to move archive packages of
> @@ -30,6 +37,10 @@ python () {
>          recrdeptask += ' do_archive_configured_sources '
>          d.setVarFlag('do_build', 'recrdeptask', recrdeptask)
>  
> +        deps = d.getVarFlag('do_archive_scripts_logs', 'deps') or []
> +        deps.append(write_package_task)
> +        d.setVarFlag('do_archive_scripts_logs', 'deps', deps)

Looking at the patch series, this is code introducing users of the
'deps' flag outside of externalsrc.bbclass (which has some nasty reasons
it currently pokes bitbake internals).

I'd like to not introduce usage of the flag so can you please change
these references to things like:

d.appendVarFlag('do_archive_scripts_logs', 'deps', ' do_package_write_' + packaging)

Use of appendVarFlag applies anywhere you currently do a set, append,
set operation, its just neater code and gives us some scope to optmise
the implementation in bitbake at a later date.

This applies to both this patch and the other one.

Thanks,

Richard





More information about the Openembedded-core mailing list