* [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe
@ 2015-08-24 17:12 Aníbal Limón
2015-08-24 17:12 ` [PATCH 2/2][dizzy] license.bbclass: fix unexpected operator for LICENSE values with space Aníbal Limón
2015-08-28 16:39 ` [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe akuster808
0 siblings, 2 replies; 3+ messages in thread
From: Aníbal Limón @ 2015-08-24 17:12 UTC (permalink / raw)
To: openembedded-core
Drop removal of [|&()*] operators in pkged_lic because this removal is only
needed to validate if license is collected.
[YOCTO #6757]
(From OE-Core rev: 57e5f74382d51f2a8df00e18b6008e3d2b44ad1a)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/license.bbclass | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 91d8bab..dfb162d 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -49,24 +49,25 @@ license_create_manifest() {
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
pkged_name="$(basename $(readlink ${filename}))"
- pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
if [ -z ${pkged_lic} ]; then
# fallback checking value of LICENSE
- pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
fi
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
- printf "LICENSE:" >> ${LICENSE_MANIFEST}
- for lic in ${pkged_lic}; do
+ echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
+ echo "" >> ${LICENSE_MANIFEST}
+
+ lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
+ for lic in ${lics}; do
# to reference a license file trim trailing + symbol
if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
fi
- printf " ${lic}" >> ${LICENSE_MANIFEST}
done
- printf "\n\n" >> ${LICENSE_MANIFEST}
done
# Two options here:
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2][dizzy] license.bbclass: fix unexpected operator for LICENSE values with space
2015-08-24 17:12 [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe Aníbal Limón
@ 2015-08-24 17:12 ` Aníbal Limón
2015-08-28 16:39 ` [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe akuster808
1 sibling, 0 replies; 3+ messages in thread
From: Aníbal Limón @ 2015-08-24 17:12 UTC (permalink / raw)
To: openembedded-core
From: Martin Jansa <martin.jansa@gmail.com>
* add quotes around pkged_lic so that it works correctly with spaces
* fixes following error:
run.license_create_manifest.50601: 193: [: GPLv2: unexpected operator
(From OE-Core rev: 2bb8b2abb689d91b7b7e28e6bd528747bde94dd2)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/license.bbclass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index dfb162d..8d383ca 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -50,7 +50,7 @@ license_create_manifest() {
pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
pkged_name="$(basename $(readlink ${filename}))"
pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
- if [ -z ${pkged_lic} ]; then
+ if [ -z "${pkged_lic}" ]; then
# fallback checking value of LICENSE
pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
fi
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe
2015-08-24 17:12 [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe Aníbal Limón
2015-08-24 17:12 ` [PATCH 2/2][dizzy] license.bbclass: fix unexpected operator for LICENSE values with space Aníbal Limón
@ 2015-08-28 16:39 ` akuster808
1 sibling, 0 replies; 3+ messages in thread
From: akuster808 @ 2015-08-28 16:39 UTC (permalink / raw)
To: openembedded-core
merged to staging
thanks
armin
On 08/24/2015 10:12 AM, Aníbal Limón wrote:
> Drop removal of [|&()*] operators in pkged_lic because this removal is only
> needed to validate if license is collected.
>
> [YOCTO #6757]
>
> (From OE-Core rev: 57e5f74382d51f2a8df00e18b6008e3d2b44ad1a)
>
> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> meta/classes/license.bbclass | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
> index 91d8bab..dfb162d 100644
> --- a/meta/classes/license.bbclass
> +++ b/meta/classes/license.bbclass
> @@ -49,24 +49,25 @@ license_create_manifest() {
>
> pkged_pv="$(sed -n 's/^PV: //p' ${filename})"
> pkged_name="$(basename $(readlink ${filename}))"
> - pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
> + pkged_lic="$(sed -n "/^LICENSE_${pkged_name}: /{ s/^LICENSE_${pkged_name}: //; p }" ${filename})"
> if [ -z ${pkged_lic} ]; then
> # fallback checking value of LICENSE
> - pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[|&()*]/ /g; s/ */ /g; p }" ${filename})"
> + pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; p }" ${filename})"
> fi
>
> echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
> echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}
> echo "RECIPE NAME:" ${pkged_pn} >> ${LICENSE_MANIFEST}
> - printf "LICENSE:" >> ${LICENSE_MANIFEST}
> - for lic in ${pkged_lic}; do
> + echo "LICENSE:" ${pkged_lic} >> ${LICENSE_MANIFEST}
> + echo "" >> ${LICENSE_MANIFEST}
> +
> + lics="$(echo ${pkged_lic} | sed "s/[|&()*]/ /g" | sed "s/ */ /g" )"
> + for lic in ${lics}; do
> # to reference a license file trim trailing + symbol
> if ! [ -e "${LICENSE_DIRECTORY}/${pkged_pn}/generic_${lic%+}" ]; then
> bbwarn "The license listed ${lic} was not in the licenses collected for ${pkged_pn}"
> fi
> - printf " ${lic}" >> ${LICENSE_MANIFEST}
> done
> - printf "\n\n" >> ${LICENSE_MANIFEST}
> done
>
> # Two options here:
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-28 16:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-24 17:12 [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe Aníbal Limón
2015-08-24 17:12 ` [PATCH 2/2][dizzy] license.bbclass: fix unexpected operator for LICENSE values with space Aníbal Limón
2015-08-28 16:39 ` [PATCH 1/2][dizzy] license_class: fix license.manifest shows LICENSE field differently to recipe akuster808
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox