diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-23 11:47:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-23 11:47:50 +0000 |
commit | 707132c60a84cdcf50da056c68f2da7402d3b2e8 (patch) | |
tree | 2ad17c9577df620b607ea22a4290abddedf7dd55 /bitbake | |
parent | 56a92105fe6b779c69bccd44c2cff8f21cafdfbd (diff) | |
download | poky-707132c60a84cdcf50da056c68f2da7402d3b2e8.tar.gz |
bitbake/fetch2: Ensure SRCREV_pn-PN is checked for a revision when the SRC_URI is unnamed
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index fb8e9e4d0c..4e03fc9884 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): | |||
498 | return ud.parm['tag'] | 498 | return ud.parm['tag'] |
499 | 499 | ||
500 | rev = None | 500 | rev = None |
501 | pn = data.getVar("PN", d, True) | ||
501 | if name != '': | 502 | if name != '': |
502 | pn = data.getVar("PN", d, True) | ||
503 | rev = data.getVar("SRCREV_%s_pn-%s" % (name, pn), d, True) | 503 | rev = data.getVar("SRCREV_%s_pn-%s" % (name, pn), d, True) |
504 | if not rev: | 504 | if not rev: |
505 | rev = data.getVar("SRCREV_%s" % name, d, True) | 505 | rev = data.getVar("SRCREV_%s" % name, d, True) |
506 | if not rev: | 506 | if not rev: |
507 | rev = data.getVar("SRCREV_pn-%s" % pn, d, True) | ||
508 | if not rev: | ||
507 | rev = data.getVar("SRCREV", d, True) | 509 | rev = data.getVar("SRCREV", d, True) |
508 | if rev == "INVALID": | 510 | if rev == "INVALID": |
509 | raise FetchError("Please set SRCREV to a valid value", ud.url) | 511 | raise FetchError("Please set SRCREV to a valid value", ud.url) |