summaryrefslogtreecommitdiff
path: root/poky/bitbake/lib/bb/fetch2/__init__.py
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@intel.com>2022-01-06 23:59:39 +0300
committerJason M. Bills <jason.m.bills@intel.com>2022-01-06 23:59:39 +0300
commit32777eec25d2c527a62e5ffab90a3dfef35855aa (patch)
tree588a90a6fe9fb0b35c7ce23ea3bd79fa5151ccde /poky/bitbake/lib/bb/fetch2/__init__.py
parent61f1ca1b31a9a1108e9e7f71e47fdc19beb0490b (diff)
parent5cc2f81c5b66da00cad24e18b0d23442af060c3f (diff)
downloadopenbmc-32777eec25d2c527a62e5ffab90a3dfef35855aa.tar.xz
Merge tag '0.86' of firmware.bmc.openbmc.yocto.openbmc into update
Diffstat (limited to 'poky/bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r--poky/bitbake/lib/bb/fetch2/__init__.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/poky/bitbake/lib/bb/fetch2/__init__.py b/poky/bitbake/lib/bb/fetch2/__init__.py
index 914fa5c02..ee29d89b1 100644
--- a/poky/bitbake/lib/bb/fetch2/__init__.py
+++ b/poky/bitbake/lib/bb/fetch2/__init__.py
@@ -466,7 +466,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None):
# Kill parameters, they make no sense for mirror tarballs
uri_decoded[5] = {}
elif ud.localpath and ud.method.supports_checksum(ud):
- basename = os.path.basename(ud.localpath)
+ basename = os.path.basename(uri_decoded[loc])
if basename and not result_decoded[loc].endswith(basename):
result_decoded[loc] = os.path.join(result_decoded[loc], basename)
else:
@@ -754,6 +754,11 @@ def get_srcrev(d, method_name='sortable_revision'):
that fetcher provides a method with the given name and the same signature as sortable_revision.
"""
+ recursion = d.getVar("__BBINSRCREV")
+ if recursion:
+ raise FetchError("There are recursive references in fetcher variables, likely through SRC_URI")
+ d.setVar("__BBINSRCREV", True)
+
scms = []
fetcher = Fetch(d.getVar('SRC_URI').split(), d)
urldata = fetcher.ud
@@ -768,6 +773,7 @@ def get_srcrev(d, method_name='sortable_revision'):
autoinc, rev = getattr(urldata[scms[0]].method, method_name)(urldata[scms[0]], d, urldata[scms[0]].names[0])
if len(rev) > 10:
rev = rev[:10]
+ d.delVar("__BBINSRCREV")
if autoinc:
return "AUTOINC+" + rev
return rev
@@ -802,6 +808,7 @@ def get_srcrev(d, method_name='sortable_revision'):
if seenautoinc:
format = "AUTOINC+" + format
+ d.delVar("__BBINSRCREV")
return format
def localpath(url, d):
@@ -827,6 +834,7 @@ FETCH_EXPORT_VARS = ['HOME', 'PATH',
'DBUS_SESSION_BUS_ADDRESS',
'P4CONFIG',
'SSL_CERT_FILE',
+ 'AWS_PROFILE',
'AWS_ACCESS_KEY_ID',
'AWS_SECRET_ACCESS_KEY',
'AWS_DEFAULT_REGION']