Skip to contentSkip to conversation

fetch2: avoid circular recursion with SRCPV in PR

PATCH New Peter Marko 1 participant 2 messages Oct 10, 2018

lore
Share & tools
lore
#0 lore raw

cover fetch2: avoid circular recursion with SRCPV in PR

This change introduces fix for circular dependency if SRCPV is in PR.

Although it's maybe not a common to use SRCPV in PR instead of PV, nothing prevented it in previous releases.
PR is part of overall version string and we have special handling of PV string of custom recipes, thus we add all the "extra info" in PR. When migrating from poky-pyro to latest master, this error occurred. Please consider also this non-standard use-case.

Peter Marko (1):
fetch2: avoid circular recursion with SRCPV in PR

 lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 fetch2: avoid circular recursion with SRCPV in PR

Some recent changes broke SRCPV and workaround was introduced to avoid circular dependency if SRCPV is in PV. However there is still the same error if SRCPV is in PR.

---
 lib/bb/fetch2/__init__.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lib/bb/fetch2/__init__.py +3 -1
index a83526a5..cb2f325a 100644
@@ -837,14 +837,16 @@ 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
+    # If PATH contains WORKDIR which contains PV-PR 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")
+        d.getVar("PR")
     except bb.data_smart.ExpansionError:
         d = bb.data.createCopy(d)
         d.setVar("PV", "fetcheravoidrecurse")
+        d.setVar("PR", "fetcheravoidrecurse")
 
     origenv = d.getVar("BB_ORIGENV", False)
     for var in exportvars:
Signature · 1 line
2.11.0