From: Paul Eggleton <paul.eggleton@linux.intel.com>
To: Hongxu Jia <hongxu.jia@windriver.com>
Cc: openembedded-core@lists.openembedded.org, saul.wold@intel.com
Subject: Re: [PATCH 1/1] license.bbclass: fix copying license directories failed
Date: Thu, 21 Nov 2013 16:41:20 +0000 [thread overview]
Message-ID: <1673532.sZIipt1mGd@helios> (raw)
In-Reply-To: <e3569e31c54d36354b5c702b7b95ecda26884a18.1384943898.git.hongxu.jia@windriver.com>
Hi Hongxu,
On Wednesday 20 November 2013 18:39:02 Hongxu Jia wrote:
> For each recipe, it populated license files to ${LICENSE_DIRECTORY}/${PN},
> such as kernel's license dir was
> ${LICENSE_DIRECTORY}/kernel-3.10.17-yocto-standard;
>
> In do_rootfs task, it copied license directories from ${LICENSE_DIRECTORY}/
> ${pkg}, and ${pkg} was listed in ${INSTALLED_PKGS};
>
> We got ${INSTALLED_PKGS} by rpm query, such as the kernel were 'kernel-*',
> but the kernel's PN was linux-yocto, so searching ${LICENSE_DIRECTORY}/
> kernel-* failed.
>
> Copied license directories from ${LICENSE_DIRECTORY}/${PN} fixed this issue.
>
> [YOCTO #5572]
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> meta/classes/license.bbclass | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index 6d7ee94..32605ff 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -68,15 +68,18 @@ license_create_manifest() {
> if [ "${COPY_LIC_DIRS}" = "1" ]; then
> for pkg in ${INSTALLED_PKGS}; do
> mkdir -p ${IMAGE_ROOTFS}/usr/share/common-licenses/${pkg}
> - for lic in `ls ${LICENSE_DIRECTORY}/${pkg}`; do
> + pkged_pn="$(sed -n "/^PACKAGE NAME: ${pkg}$/,/^$/ \
> + {s/^RECIPE NAME: //; /^PACKAGE
> NAME:/d; /^PACKAGE VERSION:/d; /^LICENSE:/d; p}" \ +
> ${LICENSE_MANIFEST})"
> + for lic in `ls ${LICENSE_DIRECTORY}/${pkged_pn}`; do
This isn't the right way to do this. If you need to look up the recipe name
from the target package name, in master you can now use:
oe-pkgdata-util lookup-recipe ${PKGDATA_DIR} "<list of packages>"
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
next prev parent reply other threads:[~2013-11-21 16:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 10:39 [PATCH 0/1] license.bbclass: fix copying license directories failed Hongxu Jia
2013-11-20 10:39 ` [PATCH 1/1] " Hongxu Jia
2013-11-21 16:41 ` Paul Eggleton [this message]
2013-11-22 6:06 ` Hongxu Jia
2013-11-22 9:54 ` Paul Eggleton
2013-11-23 7:21 ` Hongxu Jia
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=1673532.sZIipt1mGd@helios \
--to=paul.eggleton@linux.intel.com \
--cc=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=saul.wold@intel.com \
/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