aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLei Maohui <leimaohui@cn.fujitsu.com>2017-05-15 18:37:14 +0900
committerLei Maohui <leimaohui@cn.fujitsu.com>2017-05-15 18:37:14 +0900
commit9a11cfb199d6715d558ea1e8d501d0848252275b (patch)
tree1c6b5f0f6adca5519f86b36ded3df508dfc89cea
parent867beda448e6f43bc86804bd8125d51b992a89fc (diff)
downloadmeta-spdxscanner-9a11cfb199d6715d558ea1e8d501d0848252275b.tar.gz
meta-spdxscanner-9a11cfb199d6715d558ea1e8d501d0848252275b.tar.bz2
meta-spdxscanner-9a11cfb199d6715d558ea1e8d501d0848252275b.zip
Fix a error, otherwise, dosocs2 will use nomo of host.
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
-rw-r--r--classes/spdx-dosocs.bbclass2
-rw-r--r--recipes-devtools/python/python-dosocs2-native_0.16.1.bb13
2 files changed, 10 insertions, 5 deletions
diff --git a/classes/spdx-dosocs.bbclass b/classes/spdx-dosocs.bbclass
index 446cd9b..55eaebf 100644
--- a/classes/spdx-dosocs.bbclass
+++ b/classes/spdx-dosocs.bbclass
@@ -91,7 +91,7 @@ python do_spdx () {
d.setVar('WORKDIR', info['workdir'])
}
python () {
- deps = ' python-dosocs2-native:do_populate_sysroot'
+ deps = ' python-dosocs2-native:do_dosocs2_init'
d.appendVarFlag('do_spdx', 'depends', deps)
}
diff --git a/recipes-devtools/python/python-dosocs2-native_0.16.1.bb b/recipes-devtools/python/python-dosocs2-native_0.16.1.bb
index 2a9aaf8..f5c128b 100644
--- a/recipes-devtools/python/python-dosocs2-native_0.16.1.bb
+++ b/recipes-devtools/python/python-dosocs2-native_0.16.1.bb
@@ -16,7 +16,9 @@ SRC_URI[sha256sum] = "868e4c1658bd54546f6f65be9770a80ac98793da3dcb71120a52237b07
S = "${WORKDIR}/DoSOCSv2-${PV}/"
-inherit distutils native
+inherit distutils native
+
+addtask do_dosocs2_init after do_populate_sysroot
DEPENDS += "python-jinja2-native \
python-native \
@@ -28,15 +30,18 @@ DEPENDS += "python-jinja2-native \
python-markupsafe-native \
python-magic-native "
-python populate_sysroot_append() {
+do_install_append() {
+ sed -i "s|scanner_nomos_path = /usr/local/|scanner_nomos_path = ${STAGING_DIR_NATIVE}/usr/|g" ${D}${PYTHON_SITEPACKAGES_DIR}/dosocs2-0.16.1-py2.7.egg/dosocs2/configtools.py
+}
+python do_dosocs2_init() {
+
import os
import subprocess
import bb
import oe.utils
import string
- dosocs2_cmd = bb.utils.which(os.getenv('PATH'), "dosocs2")
- dosocs2_init_cmd = "%s dbinit --no-confirm" % (dosocs2_cmd)
+ dosocs2_init_cmd = "dosocs2 dbinit --no-confirm"
bb.note(dosocs2_init_cmd)
try:
complementary_pkgs = subprocess.check_output(dosocs2_init_cmd,