Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] Add some (mostly packaging) vardeps
Date: Wed, 16 Nov 2011 23:42:36 +0000	[thread overview]
Message-ID: <1321486956.18905.1.camel@ted> (raw)
In-Reply-To: <CABcZAN=EfT=jtKRBgfuvMWyipDRxWiac+kSxm8qoBZxjjcej=g@mail.gmail.com>

On Wed, 2011-11-16 at 14:17 -0700, Chris Larson wrote:
> Signed-off-by: Christopher Larson <chris_larson@mentor.com>
> ---
>  meta/classes/package.bbclass       |   17 ++++++++++++++++-
>  meta/classes/package_deb.bbclass   |    1 +
>  meta/classes/package_ipk.bbclass   |    1 +
>  meta/classes/package_rpm.bbclass   |    1 +
>  meta/classes/sstate.bbclass        |    2 ++
>  meta/classes/utility-tasks.bbclass |    1 +
>  6 files changed, 22 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index d01275f..11de0e3 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1102,6 +1102,7 @@ python emit_pkgdata() {
> 
>  	bb.utils.unlockfile(lf)
>  }
> +emit_pkgdata[vardeps] += "${@gen_package_filedep_var(d)}"
>  emit_pkgdata[dirs] = "${PKGDESTWORK}/runtime"
> 
>  ldconfig_postinst_fragment() {
> @@ -1182,6 +1183,7 @@ python package_do_filedeps() {
>  		bb.data.setVar("FILERDEPENDSFLIST_" + pkg, " ".join(requires_files), d)
>  		bb.data.setVar("FILERPROVIDESFLIST_" + pkg, " ".join(provides_files), d)
>  }
> +package_do_filedeps[vardeps] += "${@gen_package_filedep_var(d)}"
> 
>  SHLIBSDIR = "${STAGING_DIR_HOST}/shlibs"
>  SHLIBSWORKDIR = "${WORKDIR}/shlibs"
> @@ -1646,7 +1648,7 @@ python package_depchains() {
> 
>  # Since bitbake can't determine which variables are accessed during package
>  # iteration, we need to list them here:
> -PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION
> RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst pkg_postrm
> INITSCRIPT_NAME INITSCRIPT_PARAMS DEBIAN_NOAUTONAME"
> +PACKAGEVARS = "FILES RDEPENDS RRECOMMENDS SUMMARY DESCRIPTION
> RSUGGESTS RPROVIDES RCONFLICTS PKG ALLOW_EMPTY pkg_postinst
> pkg_preinst pkg_postrm pkg_prerm INITSCRIPT_NAME INITSCRIPT_PARAMS
> DEBIAN_NOAUTONAME PKGV PKGR"
> 
>  def gen_packagevar(d):
>      ret = []
> @@ -1657,6 +1659,19 @@ def gen_packagevar(d):
>              ret.append(v + "_" + p)
>      return " ".join(ret)
> 
> +def gen_package_filedep_var(d):
> +    ret = []
> +    pkgs = (d.getVar("PACKAGES", True) or "").split()
> +    for pkg in pkgs:
> +        ret.append('FILERPROVIDESFLIST_' + pkg)
> +        for rpfile in (d.getVar('FILERPROVIDESFLIST_' + pkg, True) or
> "").split():
> +            ret.append('FILERPROVIDES_%s_%s' % (rpfile, pkg))
> +
> +        ret.append('FILERDEPENDSFLIST_' + pkg)
> +        for rpfile in (d.getVar('FILERDEPENDSFLIST_' + pkg, True) or
> "").split():
> +            ret.append('FILERDEPENDS_%s_%s' % (rpfile, pkg))
> +    return ret
> +
>  PACKAGE_PREPROCESS_FUNCS ?= ""
>  PACKAGEFUNCS ?= "package_get_auto_pr \	
>                  perform_packagecopy \
> diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
> index 71e46a8..4a5c6b6 100644
> --- a/meta/classes/package_deb.bbclass
> +++ b/meta/classes/package_deb.bbclass
> @@ -393,6 +393,7 @@ python do_package_deb () {
>          bb.utils.prunedir(controldir)
>          bb.utils.unlockfile(lf)
>  }
> +do_package_deb[vardeps] += "${@gen_packagevar(d)}"

For these functions, can we assume that since they depend on
do_package's signature as a task they depend on, they'd pull in changes
to the packaging variables that way?

Cheers,

Richard





      reply	other threads:[~2011-11-16 23:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-16 21:17 [PATCH 2/2] Add some (mostly packaging) vardeps Chris Larson
2011-11-16 23:42 ` Richard Purdie [this message]

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=1321486956.18905.1.camel@ted \
    --to=richard.purdie@linuxfoundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox