All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] fetch2: replace double slashes in paths in encodeurl()
@ 2012-09-07 13:34 Paul Eggleton
  2012-09-07 13:50 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Eggleton @ 2012-09-07 13:34 UTC (permalink / raw)
  To: bitbake-devel

This ensures that if all a MIRRORS entry does is add a slash, this does
not result in a circular loop.

Fixes [YOCTO #3073].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 bitbake/lib/bb/fetch2/__init__.py |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 12ebce2..b232d3e 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -178,6 +178,9 @@ def encodeurl(decoded):
         url += "@"
     if host and type != "file":
         url += "%s" % host
+    # Standardise path to ensure comparisons work
+    while '//' in path:
+        path = path.replace("//", "/")
     url += "%s" % urllib.quote(path)
     if p:
         for parm in p:
-- 
1.7.9.5




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] fetch2: replace double slashes in paths in encodeurl()
  2012-09-07 13:34 [PATCH v2] fetch2: replace double slashes in paths in encodeurl() Paul Eggleton
@ 2012-09-07 13:50 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-09-07 13:50 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: bitbake-devel

On Fri, 2012-09-07 at 14:34 +0100, Paul Eggleton wrote:
> This ensures that if all a MIRRORS entry does is add a slash, this does
> not result in a circular loop.
> 
> Fixes [YOCTO #3073].
> 
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
>  bitbake/lib/bb/fetch2/__init__.py |    3 +++
>  1 file changed, 3 insertions(+)

Merged to master, thanks.

Richard




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-07 14:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-07 13:34 [PATCH v2] fetch2: replace double slashes in paths in encodeurl() Paul Eggleton
2012-09-07 13:50 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.