From 83bbfa07ab49547da9ffcdcf924cc585932eee5a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 20 Jun 2012 12:57:15 +0000 Subject: 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 --- bitbake/lib/bb/fetch2/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bitbake/lib') 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): 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: -- cgit v1.2.3-54-g00ecf