All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function
Date: Thu, 31 Jan 2013 10:57:52 -0800	[thread overview]
Message-ID: <510ABEB0.5050400@linux.intel.com> (raw)
In-Reply-To: <61320cb73d2e573199e129ff355494f9ef47a6c2.1359554291.git.richard.purdie@linuxfoundation.org>

On 01/30/2013 06:01 AM, Richard Purdie wrote:
> The symlink handling code doesn't need to being part of populate_packages
> and is logically separate so split it out into a separate function,
> package_fixsymlinks.
>

Not sure why, this patch causes a problem with the hicolor-icon-theme.

The problem I see is:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
> ERROR:      0127:        bb.note("adding hicolor-icon-theme dependency to %s" % pkg)
> ERROR:      0128:        rdepends = d.getVar('RDEPENDS_%s' % pkg, True)
> ERROR:  *** 0129:        rdepends = rdepends + ' ' + d.getVar('MLPREFIX') + "hicolor-icon-t

In this case the rdepends is a NoneType.

I have a patch on the queue that solves the problem. I changed the lines 
above to use d.appendVar().

Sau!



> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>   meta/classes/package.bbclass |   17 ++++++++++++-----
>   1 file changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 858afbd..8bf80f5 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -919,7 +919,7 @@ python split_and_strip_files () {
>   }
>
>   python populate_packages () {
> -    import glob, stat, errno, re, subprocess
> +    import glob, re, subprocess
>
>       workdir = d.getVar('WORKDIR', True)
>       outdir = d.getVar('DEPLOY_DIR', True)
> @@ -1037,10 +1037,17 @@ python populate_packages () {
>               package_qa_handle_error("installed_vs_shipped", msg, d)
>
>       bb.build.exec_func("package_name_hook", d)
> +}
> +populate_packages[dirs] = "${D}"
> +
> +python package_fixsymlinks () {
> +    import errno
> +    pkgdest = d.getVar('PKGDEST', True)
> +    packages = d.getVar("PACKAGES").split()
>
>       dangling_links = {}
>       pkg_files = {}
> -    for pkg in package_list:
> +    for pkg in packages:
>           dangling_links[pkg] = []
>           pkg_files[pkg] = []
>           inst_root = os.path.join(pkgdest, pkg)
> @@ -1059,13 +1066,13 @@ python populate_packages () {
>                           target = os.path.join(root[len(inst_root):], target)
>                       dangling_links[pkg].append(os.path.normpath(target))
>
> -    for pkg in package_list:
> +    for pkg in packages:
>           rdepends = bb.utils.explode_dep_versions2(d.getVar('RDEPENDS_' + pkg, True) or d.getVar('RDEPENDS', True) or "")
>
>           for l in dangling_links[pkg]:
>               found = False
>               bb.debug(1, "%s contains dangling link %s" % (pkg, l))
> -            for p in package_list:
> +            for p in packages:
>                   for f in pkg_files[p]:
>                       if f == l:
>                           found = True
> @@ -1079,7 +1086,6 @@ python populate_packages () {
>                   bb.note("%s contains dangling symlink to %s" % (pkg, l))
>           d.setVar('RDEPENDS_' + pkg, bb.utils.join_deps(rdepends, commasep=False))
>   }
> -populate_packages[dirs] = "${D}"
>
>   PKGDESTWORK = "${WORKDIR}/pkgdata"
>
> @@ -1842,6 +1848,7 @@ PACKAGEFUNCS ?= "package_get_auto_pr \
>                   split_and_strip_files \
>                   fixup_perms \
>                   populate_packages \
> +                package_fixsymlinks \
>                   package_do_filedeps \
>                   package_do_shlibs \
>                   package_do_pkgconfig \
>



  reply	other threads:[~2013-01-31 19:13 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 14:01 [PATCH 00/17] Packaging performance improvements Richard Purdie
2013-01-30 14:00 ` [PATCH 01/17] alsa-tools: upgrade to 1.0.26.1 Richard Purdie
2013-01-30 14:00 ` [PATCH 02/17] multilib.conf: Use BASELIB to set baselib, not hardcode the value Richard Purdie
2013-01-30 14:00 ` [PATCH 03/17] sstate: Move debug comment to more logical place Richard Purdie
2013-01-30 14:00 ` [PATCH 04/17] insane.bbclass: Fix incorrect getVar call Richard Purdie
2013-01-30 14:00 ` [PATCH 05/17] package: Rename splitfile functions to something more descriptive Richard Purdie
2013-01-30 14:00 ` [PATCH 06/17] package.bbclass: Improve kernel module handling Richard Purdie
2013-01-30 14:01 ` [PATCH 07/17] package.bbclass: Add a shortcut exit from the mkdir function Richard Purdie
2013-01-30 14:01 ` [PATCH 08/17] package.bbclass: Check FILES once, not once per loop iteration Richard Purdie
2013-01-30 14:01 ` [PATCH 09/17] package.bbclass: Avoid copying the datastore for FILES handling Richard Purdie
2013-01-30 14:01 ` [PATCH 10/17] package.bbclass: Move PKG handling code to emit_pkgdata Richard Purdie
2013-01-30 14:01 ` [PATCH 11/17] package.bbclass: Split out package_fixsymlinks function Richard Purdie
2013-01-31 18:57   ` Saul Wold [this message]
2013-01-30 14:01 ` [PATCH 12/17] package.bbclass: Tweak PACKAGEFUNCS Richard Purdie
2013-01-30 14:01 ` [PATCH 13/17] package.bbclass: Improve package_fixsymlinks Richard Purdie
2013-01-30 14:01 ` [PATCH 14/17] package: Create global package file list and use throughout PACKAGEFUNCS Richard Purdie
2013-01-30 14:01 ` [PATCH 15/17] package.bbclass: Use expanded RDEPENDS in read_shlibdeps Richard Purdie
2013-01-30 14:01 ` [PATCH 16/17] package_ipk/deb/rpm: Ensure deploy staging directory is empty before rerunning task Richard Purdie
2013-01-30 14:01 ` [PATCH 17/17] directfb: Explictly disable mesa Richard Purdie
2013-01-30 14:43   ` Ian Geiser
2013-01-30 14:52     ` Richard Purdie
2013-01-30 14:52     ` Burton, Ross
2013-01-30 14:57       ` Ian Geiser

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=510ABEB0.5050400@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.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.