diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2015-02-19 16:39:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-23 17:35:28 +0000 |
commit | d4af8f0268a824f5a4f098c507a0d16ed29bbc58 (patch) | |
tree | 68ab5df3d830d57b9956792531957c24bf9c8d18 /meta/classes/externalsrc.bbclass | |
parent | db7f7b5097821c60729904e0f5011ab550669a47 (diff) | |
download | poky-d4af8f0268a824f5a4f098c507a0d16ed29bbc58.tar.gz |
classes/externalsrc: add workaround for recipes that use SRCPV in PV
Here we set SRC_URI to blank, however doing so means that the function
that is called when you expand the default value of SRCPV
(i.e. bb.fetch2.get_srcrev()) will fail, so any recipe that references
SRCPV in PV couldn't previously be used with externalsrc.
(At some point we may fix the function to work in the externalsrc case,
but then we would also need to ensure that ${B} did not change as a
result of PV changing any time the HEAD revision changes in the external
source tree, or you'll lose any intermediate build artifacts.)
(From OE-Core rev: 26f8060c3475ec988194b2163e422ba4e776fd8b)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-rw-r--r-- | meta/classes/externalsrc.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass index e372392801..234bd8dedd 100644 --- a/meta/classes/externalsrc.bbclass +++ b/meta/classes/externalsrc.bbclass | |||
@@ -37,6 +37,10 @@ python () { | |||
37 | d.setVar('B', '${WORKDIR}/${BPN}-${PV}/') | 37 | d.setVar('B', '${WORKDIR}/${BPN}-${PV}/') |
38 | d.setVar('SRC_URI', '') | 38 | d.setVar('SRC_URI', '') |
39 | 39 | ||
40 | if '{SRCPV}' in d.getVar('PV', False): | ||
41 | # Dummy value because the default function can't be called with blank SRC_URI | ||
42 | d.setVar('SRCPV', '999') | ||
43 | |||
40 | tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys()) | 44 | tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys()) |
41 | 45 | ||
42 | for task in tasks: | 46 | for task in tasks: |