diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-14 14:17:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-19 15:26:09 +0000 |
commit | ce1e70b8018340b54dba3a81d7d379182cb77514 (patch) | |
tree | 51e48cbda40d0c630a7a5c5c88bddc6fe11a379b /lib/bb | |
parent | 05763bc886024dcce2ce6b3060fb00abf79a9402 (diff) | |
download | bitbake-ce1e70b8018340b54dba3a81d7d379182cb77514.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb')
-rw-r--r-- | lib/bb/fetch2/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py index d6d7850df..525f47e41 100644 --- a/lib/bb/fetch2/__init__.py +++ b/lib/bb/fetch2/__init__.py @@ -819,6 +819,15 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None, log=None, workdir=None): if not cleanup: cleanup = [] + # If PATH contains WORKDIR which contains PV which contains SRCPV we + # can end up in circular recursion here so give the option of breaking it + # in a data store copy. + try: + d.getVar("PV") + except bb.data_smart.ExpansionError: + d = bb.data.createCopy(d) + d.setVar("PV", "fetcheravoidrecurse") + origenv = d.getVar("BB_ORIGENV", False) for var in exportvars: val = d.getVar(var) or (origenv and origenv.getVar(var)) |