summaryrefslogtreecommitdiffstats
path: root/bitbake
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:10:33 +0100
commit83bbfa07ab49547da9ffcdcf924cc585932eee5a (patch)
tree6fd448a6b099c32279fd916184fdbead009ff9bd /bitbake
parent196982a80312744d303692af85ffbda120091709 (diff)
downloadpoky-83bbfa07ab49547da9ffcdcf924cc585932eee5a.tar.gz
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>
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: