summaryrefslogtreecommitdiffstats
path: root/meta/classes/license.bbclass
diff options
context:
space:
mode:
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