summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-14 14:17:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-20 11:52:52 +0000
commit3f8d56d1132cc63fe13cf81dc97ba96a523e1d44 (patch)
tree0ab19b3eaa8cd28155949ee01fb4f135c1b39720 /bitbake/lib
parent51abd41ff6e732ee0df61f380e4de23fdec7629a (diff)
downloadpoky-3f8d56d1132cc63fe13cf81dc97ba96a523e1d44.tar.gz
bitbake: fetch2: Avoid recursive errors
If PATH contains WORKDIR which contains PV which contains SRCPV we can end up in circular recursion within the fetcher. This code change allows for the recursion to be broken by giving PV a temporary dummy value in a data store copy. (Bitbake rev: ce1e70b8018340b54dba3a81d7d379182cb77514) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index d6d7850dfb..525f47e417 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -819,6 +819,15 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None):
819 if not cleanup: 819 if not cleanup:
820 cleanup = [] 820 cleanup = []
821 821
822 # If PATH contains WORKDIR which contains PV which contains SRCPV we
823 # can end up in circular recursion here so give the option of breaking it
824 # in a data store copy.
825 try:
826 d.getVar("PV")
827 except bb.data_smart.ExpansionError:
828 d = bb.data.createCopy(d)
829 d.setVar("PV", "fetcheravoidrecurse")
830
822 origenv = d.getVar("BB_ORIGENV", False) 831 origenv = d.getVar("BB_ORIGENV", False)
823 for var in exportvars: 832 for var in exportvars:
824 val = d.getVar(var) or (origenv and origenv.getVar(var)) 833 val = d.getVar(var) or (origenv and origenv.getVar(var))