mirror of
https://git.yoctoproject.org/poky
synced 2026-02-12 03:33:02 +01:00
bitbake: fetch2: uri_replace() remove what amounts to a null operation and add some comments
(From Poky rev: 6d67200d052ba72258f5a0a178542ef99500a9cc) (Bitbake rev: e67af4d12f390ce6083965509ca9ea85a76dc351) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -207,15 +207,15 @@ def uri_replace(ud, uri_find, uri_replace, d):
|
||||
if not uri_replace_decoded[loc]:
|
||||
result_decoded[loc] = ""
|
||||
else:
|
||||
#bb.note("%s %s %s" % (i, uri_replace_decoded[loc], uri_decoded[loc]))
|
||||
result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc])
|
||||
if loc == 2:
|
||||
# Handle path manipulations
|
||||
basename = None
|
||||
if ud.mirrortarball:
|
||||
basename = os.path.basename(ud.mirrortarball)
|
||||
elif ud.localpath:
|
||||
basename = os.path.basename(ud.localpath)
|
||||
if basename and result_decoded[loc].endswith("/"):
|
||||
result_decoded[loc] = os.path.dirname(result_decoded[loc])
|
||||
if basename and not result_decoded[loc].endswith(basename):
|
||||
result_decoded[loc] = os.path.join(result_decoded[loc], basename)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user