1 |
On Sun, May 31, 2020 at 4:20 PM Zac Medico <zmedico@g.o> wrote: |
2 |
> |
3 |
> On 5/30/20 8:26 PM, Mike Gilbert wrote: |
4 |
> > Bug: https://bugs.gentoo.org/719810 |
5 |
> > Signed-off-by: Mike Gilbert <floppym@g.o> |
6 |
> > --- |
7 |
> > lib/portage/package/ebuild/fetch.py | 9 +++++++-- |
8 |
> > 1 file changed, 7 insertions(+), 2 deletions(-) |
9 |
> > |
10 |
> > diff --git a/lib/portage/package/ebuild/fetch.py b/lib/portage/package/ebuild/fetch.py |
11 |
> > index 28e7caf53..47c3ad28f 100644 |
12 |
> > --- a/lib/portage/package/ebuild/fetch.py |
13 |
> > +++ b/lib/portage/package/ebuild/fetch.py |
14 |
> > @@ -26,6 +26,11 @@ try: |
15 |
> > except ImportError: |
16 |
> > from urlparse import urlparse |
17 |
> > |
18 |
> > +try: |
19 |
> > + from urllib.parse import quote as urlquote |
20 |
> > +except ImportError: |
21 |
> > + from urllib import quote as urlquote |
22 |
> > + |
23 |
> > import portage |
24 |
> > portage.proxy.lazyimport.lazyimport(globals(), |
25 |
> > 'portage.package.ebuild.config:check_config_instance,config', |
26 |
> > @@ -351,7 +356,7 @@ _size_suffix_map = { |
27 |
> > |
28 |
> > class FlatLayout(object): |
29 |
> > def get_path(self, filename): |
30 |
> > - return filename |
31 |
> > + return urlquote(filename) |
32 |
> > |
33 |
> > def get_filenames(self, distdir): |
34 |
> > for dirpath, dirnames, filenames in os.walk(distdir, |
35 |
> > @@ -382,7 +387,7 @@ class FilenameHashLayout(object): |
36 |
> > c = c // 4 |
37 |
> > ret += fnhash[:c] + '/' |
38 |
> > fnhash = fnhash[c:] |
39 |
> > - return ret + filename |
40 |
> > + return ret + urlquote(filename) |
41 |
> > |
42 |
> > def get_filenames(self, distdir): |
43 |
> > pattern = '' |
44 |
> > |
45 |
> |
46 |
> Please go ahead an merge, since SRC_URI arrows allow use to neglect |
47 |
> unquoting as discussed in |
48 |
> https://archives.gentoo.org/gentoo-portage-dev/message/176d5e6f38b346be760d05f9c6e72e02. |
49 |
|
50 |
I ended up reverting this; I did not realize emirrordist shared the |
51 |
same code. A new patch is on its way. |