[oe-commits] leimaohui : spdx.bbclass: Add SPDX-specific source tree variable.
git at git.openembedded.org
git at git.openembedded.org
Mon Sep 29 16:50:51 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 41784ad0588b4aba6897d6e9e0efd0314ab19747
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=41784ad0588b4aba6897d6e9e0efd0314ab19747
Author: leimaohui <leimaohui at cn.fujitsu.com>
Date: Tue Sep 23 17:48:12 2014 +0800
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 at cn.fujitsu.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/spdx.bbclass | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 55ce3af..bccc230 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 "")
More information about the Openembedded-commits
mailing list