[yocto] [PATCH 1/5] spdx.bbclass:Add SPDX-specific source tree variable.

leimaohui leimaohui at cn.fujitsu.com
Tue Sep 23 02:48:12 PDT 2014


Add SPDX-specific source tree variable for recipes where $S is a subdirectory of the source tree.

Signed-off-by: leimaohui <leimaohui at cn.fujitsu.com>
---
 meta/classes/spdx.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/spdx.bbclass b/meta/classes/spdx.bbclass
index 55ce3af..27169f0 100644
--- a/meta/classes/spdx.bbclass
+++ b/meta/classes/spdx.bbclass
@@ -18,13 +18,15 @@
 SPDXOUTPUTDIR = "${WORKDIR}/spdx_output_dir"
 SPDXSSTATEDIR = "${WORKDIR}/spdx_sstate_dir"
 
+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 "")
-- 
1.9.1




More information about the yocto mailing list