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