All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Shakeel, Muhammad" <muhammad_shakeel@mentor.com>
Cc: Christopher Larson <chris_larson@mentor.com>,
	openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 2/2 v2] archive-*-source.bbclass: Handle all package classes
Date: Wed, 16 Jan 2013 11:39:49 +0000	[thread overview]
Message-ID: <1358336389.3276.11.camel@ted> (raw)
In-Reply-To: <1358171300-970-1-git-send-email-muhammad_shakeel@mentor.com>

On Mon, 2013-01-14 at 18:48 +0500, Shakeel, Muhammad wrote:
> From: Muhammad Shakeel <muhammad_shakeel@mentor.com>
> 
> * Add archiver tasks correctly for any 'IMAGE_PKGTYPE'.
> 
> [YOCTO #3449]
> 
> Signed-off-by: Muhammad Shakeel <muhammad_shakeel@mentor.com>
> Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
> Signed-off-by: Christopher Larson <chris_larson@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)

I'd not previously noticed bitbake was exposing this "deps" flag as a
list. I'd previously assumed we interacted with strings through the
deptask flag so we'd use something like:

d.appendVarFlag('do_dumpdata_create_diff_gz', 'deptask', ' do_package_write_' + packaging)

We should probably make a decision whether deps is meant to be exposed
or whether we should be using deptask. I appreciate this patch isn't at
fault, its the archiver code in general doing this. I agree the API is
less optimal using strings but it is also more consistent with every
other set of flags...

Cheers,

Richard







  parent reply	other threads:[~2013-01-16 11:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 13:48 [PATCH 2/2 v2] archive-*-source.bbclass: Handle all package classes Shakeel, Muhammad
2013-01-14 17:33 ` Otavio Salvador
2013-01-16 11:45   ` Richard Purdie
2013-01-16 11:39 ` Richard Purdie [this message]
2013-01-16 11:48 ` Richard Purdie
2013-01-16 14:58   ` Shakeel, Muhammad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1358336389.3276.11.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --cc=chris_larson@mentor.com \
    --cc=muhammad_shakeel@mentor.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.