summaryrefslogtreecommitdiffstats
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:51:19 +0000
commitc8dee9b92dfd545852ecac8dc2adfc95ac02e957 (patch)
tree5f1b86954646a0f3bb914407994388a6a4346769 /meta/classes/license.bbclass
parent5d3860f4a8abb8e95442b04f8b84a333af362fcd (diff)
downloadpoky-c8dee9b92dfd545852ecac8dc2adfc95ac02e957.tar.gz
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 *` (From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251) 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() {
104 104
105 # If the generic does not exist we need to check to see if there is an SPDX mapping to it 105 # If the generic does not exist we need to check to see if there is an SPDX mapping to it
106 if not os.path.isfile(os.path.join(generic_directory, license_type)): 106 if not os.path.isfile(os.path.join(generic_directory, license_type)):
107 if bb.data.getVarFlag('SPDXLICENSEMAP', license_type, d) != None: 107 if d.getVarFlag('SPDXLICENSEMAP', license_type) != None:
108 # Great, there is an SPDXLICENSEMAP. We can copy! 108 # Great, there is an SPDXLICENSEMAP. We can copy!
109 bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type)) 109 bb.note("We need to use a SPDXLICENSEMAP for %s" % (license_type))
110 spdx_generic = bb.data.getVarFlag('SPDXLICENSEMAP', license_type, d) 110 spdx_generic = d.getVarFlag('SPDXLICENSEMAP', license_type)
111 copy_license(generic_directory, gen_lic_dest, spdx_generic) 111 copy_license(generic_directory, gen_lic_dest, spdx_generic)
112 link_license(gen_lic_dest, destdir, spdx_generic) 112 link_license(gen_lic_dest, destdir, spdx_generic)
113 else: 113 else:
@@ -120,16 +120,16 @@ python do_populate_lic() {
120 link_license(gen_lic_dest, destdir, license_type) 120 link_license(gen_lic_dest, destdir, license_type)
121 121
122 # All the license types for the package 122 # All the license types for the package
123 license_types = bb.data.getVar('LICENSE', d, True) 123 license_types = d.getVar('LICENSE', True)
124 # All the license files for the package 124 # All the license files for the package
125 lic_files = bb.data.getVar('LIC_FILES_CHKSUM', d, True) 125 lic_files = d.getVar('LIC_FILES_CHKSUM', True)
126 pn = bb.data.getVar('PN', d, True) 126 pn = d.getVar('PN', True)
127 # The base directory we wrangle licenses to 127 # The base directory we wrangle licenses to
128 destdir = os.path.join(bb.data.getVar('LICSSTATEDIR', d, True), pn) 128 destdir = os.path.join(d.getVar('LICSSTATEDIR', True), pn)
129 # The license files are located in S/LIC_FILE_CHECKSUM. 129 # The license files are located in S/LIC_FILE_CHECKSUM.
130 srcdir = bb.data.getVar('S', d, True) 130 srcdir = d.getVar('S', True)
131 # Directory we store the generic licenses as set in the distro configuration 131 # Directory we store the generic licenses as set in the distro configuration
132 generic_directory = bb.data.getVar('COMMON_LICENSE_DIR', d, True) 132 generic_directory = d.getVar('COMMON_LICENSE_DIR', True)
133 133
134 try: 134 try:
135 bb.mkdirhier(destdir) 135 bb.mkdirhier(destdir)
@@ -154,7 +154,7 @@ python do_populate_lic() {
154 if ret is False or ret == 0: 154 if ret is False or ret == 0:
155 bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile) 155 bb.warn("%s could not be copied for some reason. It may not exist. WARN for now." % srclicfile)
156 156
157 gen_lic_dest = os.path.join(bb.data.getVar('LICENSE_DIRECTORY', d, True), "common-licenses") 157 gen_lic_dest = os.path.join(d.getVar('LICENSE_DIRECTORY', True), "common-licenses")
158 158
159 clean_licenses = "" 159 clean_licenses = ""
160 160