summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2012-09-11 04:18:14 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-12 14:44:55 +0100
commit8fd734e6f9159921d0d148c4d5c0fa37c882b21a (patch)
tree13abd4e8d9f3867ed15feb995b060ddb2eac1f47 /meta/classes/license.bbclass
parent100e457de4b223defb1a844d3b85af812caf2f79 (diff)
downloadopenembedded-core-8fd734e6f9159921d0d148c4d5c0fa37c882b21a.tar.gz
classes/license: account LICENSE_${pkg} values in manifest
Trivial change, process LICENSE_${pkg} and LICENSE values. This fixes multiple cases, when license is not specified at all in license.manifest Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 8fb66be502..74a830686e 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -101,8 +101,13 @@ license_create_manifest() {
continue
fi
- pkged_lic="$(sed -n '/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }' ${filename})"
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})"
+ if [ -z ${pkged_lic} ]; then
+ # fallback checking value of LICENSE
+ pkged_lic="$(sed -n "/^LICENSE: /{ s/^LICENSE: //; s/[+|&()*]/ /g; s/ */ /g; p }" ${filename})"
+ fi
echo "PACKAGE NAME:" ${pkg} >> ${LICENSE_MANIFEST}
echo "PACKAGE VERSION:" ${pkged_pv} >> ${LICENSE_MANIFEST}