diff options
author | leimaohui <leimaohui@cn.fujitsu.com> | 2014-09-23 17:48:12 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-09-30 14:10:35 +0100 |
commit | 0d3aac77769f89c82602ca049e43975c3eca988f (patch) | |
tree | 4d367ad03e970751b33fd174642061fddb669d30 /meta/classes/spdx.bbclass | |
parent | b186c4a1fce41bbc4952d6922d5814e933aaf311 (diff) | |
download | poky-0d3aac77769f89c82602ca049e43975c3eca988f.tar.gz |
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 ]
(From OE-Core rev: 41784ad0588b4aba6897d6e9e0efd0314ab19747)
Signed-off-by: leimaohui <leimaohui@cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/spdx.bbclass')
-rw-r--r-- | meta/classes/spdx.bbclass | 6 |
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 @@ | |||
18 | SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir" | 18 | SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir" |
19 | SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir" | 19 | SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir" |
20 | 20 | ||
21 | # If ${S} isn't actually the top-level source directory, set SPDX_S to point at | ||
22 | # the real top-level directory. | ||
23 | SPDX_S ?= "${S}" | ||
24 | |||
21 | python do_spdx () { | 25 | python do_spdx () { |
22 | import os, sys | 26 | import os, sys |
23 | import json | 27 | import json |
24 | 28 | ||
25 | info = {} | 29 | info = {} |
26 | info['workdir'] = (d.getVar('WORKDIR', True) or "") | 30 | info['workdir'] = (d.getVar('WORKDIR', True) or "") |
27 | info['sourcedir'] = (d.getVar('S', True) or "") | 31 | info['sourcedir'] = (d.getVar('SPDX_S', True) or "") |
28 | info['pn'] = (d.getVar( 'PN', True ) or "") | 32 | info['pn'] = (d.getVar( 'PN', True ) or "") |
29 | info['pv'] = (d.getVar( 'PV', True ) or "") | 33 | info['pv'] = (d.getVar( 'PV', True ) or "") |
30 | info['src_uri'] = (d.getVar( 'SRC_URI', True ) or "") | 34 | info['src_uri'] = (d.getVar( 'SRC_URI', True ) or "") |