summaryrefslogtreecommitdiff
path: root/meta/classes/spdx.bbclass
diff options
context:
space:
mode:
authorleimaohui <leimaohui@cn.fujitsu.com>2014-09-23 17:48:12 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-29 17:49:11 +0100
commit41784ad0588b4aba6897d6e9e0efd0314ab19747 (patch)
treeaeb790b685e13ef89ca3a898e91389e50b2f3a08 /meta/classes/spdx.bbclass
parent0ef8390425ef5722c00074e962e64e70b7ff8598 (diff)
downloadopenembedded-core-41784ad0588b4aba6897d6e9e0efd0314ab19747.tar.gz
openembedded-core-41784ad0588b4aba6897d6e9e0efd0314ab19747.tar.bz2
openembedded-core-41784ad0588b4aba6897d6e9e0efd0314ab19747.zip
spdx.bbclass: Add SPDX-specific source tree variable.
Add SPDX-specific source tree variable for recipes where $S is a subdirectory of the source tree. [ RB - add a comment for SPDX_S ] Signed-off-by: leimaohui <leimaohui@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/classes/spdx.bbclass')
-rw-r--r--meta/classes/spdx.bbclass6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 55ce3aff4f..bccc230d8c 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -18,13 +18,17 @@
SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir"
SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir"
+# If ${S} isn't actually the top-level source directory, set SPDX_S to point at
+# the real top-level directory.
+SPDX_S ?= "${S}"
+
python do_spdx () {
import os, sys
import json
info = {}
info['workdir'] = (d.getVar('WORKDIR', True) or "")
- info['sourcedir'] = (d.getVar('S', True) or "")
+ info['sourcedir'] = (d.getVar('SPDX_S', True) or "")
info['pn'] = (d.getVar( 'PN', True ) or "")
info['pv'] = (d.getVar( 'PV', True ) or "")
info['src_uri'] = (d.getVar( 'SRC_URI', True ) or "")