[oe-commits] Paul Eggleton : classes/externalsrc: add workaround for recipes that use SRCPV in PV
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 23 17:36:14 UTC 2015
Module: openembedded-core.git
Branch: master
Commit: 26f8060c3475ec988194b2163e422ba4e776fd8b
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=26f8060c3475ec988194b2163e422ba4e776fd8b
Author: Paul Eggleton <paul.eggleton at linux.intel.com>
Date: Thu Feb 19 16:39:53 2015 +0000
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.)
Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/externalsrc.bbclass | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index e372392..234bd8d 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -37,6 +37,10 @@ python () {
d.setVar('B', '${WORKDIR}/${BPN}-${PV}/')
d.setVar('SRC_URI', '')
+ if '{SRCPV}' in d.getVar('PV', False):
+ # Dummy value because the default function can't be called with blank SRC_URI
+ d.setVar('SRCPV', '999')
+
tasks = filter(lambda k: d.getVarFlag(k, "task"), d.keys())
for task in tasks:
More information about the Openembedded-commits
mailing list