Patchwork [bitbake-devel,11/14] fetch2: uri_replace() remove what amounts to a null operation and add some comments

login
register
mail settings
Submitter Richard Purdie
Date June 20, 2012, 2:13 p.m.
Message ID <3234093f2018bd7cf03d4aad86e4ab99c013a165.1340200208.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/30285/
State New
Headers show

Comments

Richard Purdie - June 20, 2012, 2:13 p.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 bitbake/lib/bb/fetch2/__init__.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 37f13e2..945db7b 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: