1 |
This avoids double-escaping in emirrordist. We only want to escape the |
2 |
path when fetching the file from the mirror, not when mirroring the |
3 |
file. |
4 |
|
5 |
Bug: https://bugs.gentoo.org/719810 |
6 |
Fixes: 4c18f523bb86a8be4c148f365dabee06fca2e4fa |
7 |
Signed-off-by: Mike Gilbert <floppym@g.o> |
8 |
--- |
9 |
lib/portage/package/ebuild/fetch.py | 7 ++++++- |
10 |
1 file changed, 6 insertions(+), 1 deletion(-) |
11 |
|
12 |
diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py |
13 |
index 28e7caf53..9682fea89 100644 |
14 |
--- a/lib/portage/package/ebuild/fetch.py |
15 |
+++ b/lib/portage/package/ebuild/fetch.py |
16 |
@@ -26,6 +26,11 @@ try: |
17 |
except ImportError: |
18 |
from urlparse import urlparse |
19 |
|
20 |
+try: |
21 |
+ from urllib.parse import quote as urlquote |
22 |
+except ImportError: |
23 |
+ from urllib import quote as urlquote |
24 |
+ |
25 |
import portage |
26 |
portage.proxy.lazyimport.lazyimport(globals(), |
27 |
'portage.package.ebuild.config:check_config_instance,config', |
28 |
@@ -520,7 +525,7 @@ def get_mirror_url(mirror_url, filename, mysettings, cache_path=None): |
29 |
f.close() |
30 |
|
31 |
return (mirror_url + "/distfiles/" + |
32 |
- mirror_conf.get_best_supported_layout().get_path(filename)) |
33 |
+ urlquote(mirror_conf.get_best_supported_layout().get_path(filename))) |
34 |
|
35 |
|
36 |
def fetch(myuris, mysettings, listonly=0, fetchonly=0, |
37 |
-- |
38 |
2.27.0.rc2 |