Skip to contentSkip to conversation

fetch2: fix fetcher looping due to self-referential entries

PATCH In review Paul Eggleton 1 participant 2 messages Sep 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2: fix fetcher looping due to self-referential entries

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

Fixes [YOCTO #3073].

---
 bitbake/lib/bb/fetch2/__init__.py |    1 +
 1 file changed, 1 insertion(+)
bitbake/lib/bb/fetch2/__init__.py +1 -0
index 12ebce2..a90249f 100644
@@ -178,6 +178,7 @@ def encodeurl(decoded):
         url += "@"
     if host and type != "file":
         url += "%s" % host
+    path = path.replace("//", "/")
     url += "%s" % urllib.quote(path)
     if p:
         for parm in p:
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 15 lines · On Friday 07 September 2012 14:18:11 Paul Eggleton wrote:

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

Fixes [YOCTO #3073].

---
 bitbake/lib/bb/fetch2/__init__.py |    1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/bitbake/lib/bb/fetch2/__init__.py index 12ebce2..a90249f 100644

bitbake/lib/bb/fetch2/__init__.py def encodeurl(decoded): · line 184

Quoted 7 lines
bitbake/lib/bb/fetch2/__init__.py +1 -0
@@ -178,6 +178,7 @@ def encodeurl(decoded):
         url += "@"
     if host and type != "file":
         url += "%s" % host
+    path = path.replace("//", "/")
     url += "%s" % urllib.quote(path)
     if p:
         for parm in p:

Actually I'll tweak this a bit with a different shortlog, ignore this.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre