summaryrefslogtreecommitdiff
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-09 15:00:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-11-10 11:35:32 +0000
commitb22831fd63164c4db9c0b72934d7d734a6585251 (patch)
treeedb6581a041190290855bf86714430515c9f235a /meta/classes/license.bbclass
parent07ded02ffd37b4fe60a6210dbf56490ea306f0b6 (diff)
downloadopenembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.gz
openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.tar.bz2
openembedded-core-b22831fd63164c4db9c0b72934d7d734a6585251.zip
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata: sed \ -e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \ -e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \ -e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \ -e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \ -i `grep -ril bb.data *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/license.bbclass')
-rw-r--r--meta/classes/license.bbclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index baf35f00cc..4d036b171e 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -104,10 +104,10 @@ python do_populate_lic() {
# If the generic does not exist we need to check to see if there is an SPDX mapping to it
if not os.path.isfile(os.path.join(generic_directory, license_type)):
- if bb.data.getVarFlag('SPDXLICENSEMAP', license_type, d) != None:
+ if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
# Great, there is an SPDXLICENSEMAP. We can copy!
bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type))
- spdx_generic = bb.data.getVarFlag('SPDXLICENSEMAP', license_type, d)
+ spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
copy_license(generic_directory, gen_lic_dest, spdx_generic)
link_license(gen_lic_dest, destdir, spdx_generic)
else:
@@ -120,16 +120,16 @@ python do_populate_lic() {
link_license(gen_lic_dest, destdir, license_type)
# All the license types for the package
- license_types = bb.data.getVar('LICENSE', d, True)
+ license_types = d.getVar('LICENSE', True)
# All the license files for the package
- lic_files = bb.data.getVar('LIC_FILES_CHKSUM', d, True)
- pn = bb.data.getVar('PN', d, True)
+ lic_files = d.getVar('LIC_FILES_CHKSUM', True)
+ pn = d.getVar('PN', True)
# The base directory we wrangle licenses to
- destdir = os.path.join(bb.data.getVar('LICSSTATEDIR', d, True), pn)
+ destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn)
# The license files are located in S/LIC_FILE_CHECKSUM.
- srcdir = bb.data.getVar('S', d, True)
+ srcdir = d.getVar('S', True)
# Directory we store the generic licenses as set in the distro configuration
- generic_directory = bb.data.getVar('COMMON_LICENSE_DIR', d, True)
+ generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
try:
bb.mkdirhier(destdir)
@@ -154,7 +154,7 @@ python do_populate_lic() {
if ret is False or ret == 0:
bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile)
- gen_lic_dest = os.path.join(bb.data.getVar('LICENSE_DIRECTORY', d, True), "common-licenses")
+ gen_lic_dest = os.path.join(d.getVar('LICENSE_DIRECTORY', True), "common-licenses")
clean_licenses = ""