summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index fb8e9e4d0..4e03fc988 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -498,12 +498,14 @@ def srcrev_internal_helper(ud, d, name):
return ud.parm['tag']
rev = None
+ pn = data.getVar("PN", d, True)
if name != '':
- pn = data.getVar("PN", d, True)
rev = data.getVar("SRCREV_%s_pn-%s" % (name, pn), d, True)
if not rev:
rev = data.getVar("SRCREV_%s" % name, d, True)
if not rev:
+ rev = data.getVar("SRCREV_pn-%s" % pn, d, True)
+ if not rev:
rev = data.getVar("SRCREV", d, True)
if rev == "INVALID":
raise FetchError("Please set SRCREV to a valid value", ud.url)