summaryrefslogtreecommitdiffstats
path: root/meta-oe/classes/scancode.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/classes/scancode.bbclass')
-rw-r--r--meta-oe/classes/scancode.bbclass10
1 files changed, 5 insertions, 5 deletions
diff --git a/meta-oe/classes/scancode.bbclass b/meta-oe/classes/scancode.bbclass
index 701660f578..e0f0dbca40 100644
--- a/meta-oe/classes/scancode.bbclass
+++ b/meta-oe/classes/scancode.bbclass
@@ -3,18 +3,18 @@
3# For more informaiton https://github.com/nexB/scancode-toolkit 3# For more informaiton https://github.com/nexB/scancode-toolkit
4 4
5SCANCODE_FORMAT ?= "html-app" 5SCANCODE_FORMAT ?= "html-app"
6EXT = "${@'html' if d.getVar('SCANCODE_FORMAT', True) == 'html-app' else 'json'}" 6EXT = "${@'html' if d.getVar('SCANCODE_FORMAT') == 'html-app' else 'json'}"
7SCANCODE_TOOLKIT = "${@get_scancode_toolkit(d)}" 7SCANCODE_TOOLKIT = "${@get_scancode_toolkit(d)}"
8SCANCODE_TAG = "v2.2.1" 8SCANCODE_TAG = "v2.2.1"
9SCANCODE_GIT_LOCATION ?= "https://github.com/nexB/scancode-toolkit.git" 9SCANCODE_GIT_LOCATION ?= "https://github.com/nexB/scancode-toolkit.git"
10SCANCODE_SRC_LOCATION ?= "${DL_DIR}/scancode" 10SCANCODE_SRC_LOCATION ?= "${DL_DIR}/scancode"
11 11
12def get_scancode_toolkit(d): 12def get_scancode_toolkit(d):
13 lf = bb.utils.lockfile(d.getVar('SCANCODE_SRC_LOCATION', True) + ".lock") 13 lf = bb.utils.lockfile(d.getVar('SCANCODE_SRC_LOCATION') + ".lock")
14 if (not os.path.exists(d.getVar('SCANCODE_SRC_LOCATION', True))): 14 if (not os.path.exists(d.getVar('SCANCODE_SRC_LOCATION'))):
15 os.system("git clone %s %s -b %s" % (d.getVar('SCANCODE_GIT_LOCATION', True), d.getVar('SCANCODE_SRC_LOCATION', True), d.getVar('SCANCODE_TAG', True))) 15 os.system("git clone %s %s -b %s" % (d.getVar('SCANCODE_GIT_LOCATION'), d.getVar('SCANCODE_SRC_LOCATION'), d.getVar('SCANCODE_TAG')))
16 bb.utils.unlockfile(lf) 16 bb.utils.unlockfile(lf)
17 return (d.getVar('SCANCODE_SRC_LOCATION', True)) 17 return (d.getVar('SCANCODE_SRC_LOCATION'))
18 18
19do_scancode() { 19do_scancode() {
20 mkdir -p ${DEPLOY_DIR_IMAGE}/scancode 20 mkdir -p ${DEPLOY_DIR_IMAGE}/scancode