summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 06be82da2a..baf668d9a5 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -207,15 +207,15 @@ def uri_replace(ud, uri_find, uri_replace, d):
207 if not uri_replace_decoded[loc]: 207 if not uri_replace_decoded[loc]:
208 result_decoded[loc] = "" 208 result_decoded[loc] = ""
209 else: 209 else:
210 #bb.note("%s %s %s" % (i, uri_replace_decoded[loc], uri_decoded[loc]))
210 result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc]) 211 result_decoded[loc] = re.sub(i, uri_replace_decoded[loc], uri_decoded[loc])
211 if loc == 2: 212 if loc == 2:
213 # Handle path manipulations
212 basename = None 214 basename = None
213 if ud.mirrortarball: 215 if ud.mirrortarball:
214 basename = os.path.basename(ud.mirrortarball) 216 basename = os.path.basename(ud.mirrortarball)
215 elif ud.localpath: 217 elif ud.localpath:
216 basename = os.path.basename(ud.localpath) 218 basename = os.path.basename(ud.localpath)
217 if basename and result_decoded[loc].endswith("/"):
218 result_decoded[loc] = os.path.dirname(result_decoded[loc])
219 if basename and not result_decoded[loc].endswith(basename): 219 if basename and not result_decoded[loc].endswith(basename):
220 result_decoded[loc] = os.path.join(result_decoded[loc], basename) 220 result_decoded[loc] = os.path.join(result_decoded[loc], basename)
221 else: 221 else: