aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-20 12:57:15 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-06-21 13:07:57 +0100
commite67af4d12f390ce6083965509ca9ea85a76dc351 (patch)
treea6bd5658ddc9618ba414f73b6db406a016ae63ab
parent3c468ac3ed6d045561afce19b85ae9dd18d87cea (diff)
downloadbitbake-e67af4d12f390ce6083965509ca9ea85a76dc351.tar.gz
bitbake-e67af4d12f390ce6083965509ca9ea85a76dc351.tar.bz2
bitbake-e67af4d12f390ce6083965509ca9ea85a76dc351.zip
fetch2: uri_replace() remove what amounts to a null operation and add some comments
(From Poky rev: 6d67200d052ba72258f5a0a178542ef99500a9cc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 06be82da..baf668d9 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -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: