Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 102607 - SRC_URI: spaces not supported
Summary: SRC_URI: spaces not supported
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-15 06:46 UTC by kalium
Modified: 2006-04-23 09:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to support spaces in SRC_URI (portage-2.0.52-r1_uri_spaces_support.diff,1006 bytes, text/plain)
2005-09-26 19:16 UTC, Rick Harris
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kalium 2005-08-15 06:46:56 UTC
Make wget save "a%20space.tar.bz2" as "a%20space.tar.bz2", not "a
space.tar.bz2". Otherwise we cannot fetch packages with whitespace in their names.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Zac Medico gentoo-dev 2005-08-15 07:02:52 UTC
Maybe we can simply add some double quotes around \${URI}.

FETCHCOMMAND="/usr/bin/wget -t 5 --passive-ftp -P \${DISTDIR} \"\${URI}\""
RESUMECOMMAND="/usr/bin/wget -c -t 5 --passive-ftp -P \${DISTDIR} \"\${URI}\""
Comment 2 SpanKY gentoo-dev 2005-08-15 10:35:22 UTC
that doesnt fix internal handling of SRC_URI/A in portage ... personally
i dont think it's really worth the time; dont use spaces in your URLs :p

i'm pretty sure this has been covered before, just cant seem to find the bug
Comment 3 Brian Harring gentoo-dev 2005-08-15 17:41:14 UTC
spaces won't play nice in the digests either...
Comment 4 kalium 2005-08-16 05:32:19 UTC
Just run wget like

wget -O 'filename' '$SRC_URI'

and all is fine because it does not replace the %20 with spaces in that case. So
spaces are no problem in the URL if you use URL encoding...
Comment 5 kalium 2005-08-16 05:37:54 UTC
btw: couldn't you allow real spaces by considering escape characters, ie. in the
form "these\ are\ spaces"?

As far as I remember, digest files should not have problems with spaces. At
least not if handled correctly: if there is only one file name per line and all
other fields on the same line have predefined lengths or adjacent separators,
the parsing of such a line should be no problem.
Comment 6 SpanKY gentoo-dev 2005-08-16 05:45:52 UTC
your sanest bet is what you suggested in Comment #4
Comment 7 Rick Harris 2005-09-26 19:16:30 UTC
Created attachment 69314 [details]
Patch to support spaces in SRC_URI

Example:
SRC_URI="http://www.site.com/foo%20bar%20here.tar.gz"
Comment 8 SpanKY gentoo-dev 2005-09-26 19:29:02 UTC
really shouldnt hardcode that kind of stuff

find an html decoder function which translates encoded URL's to the proper format
Comment 9 Simon Stelling (RETIRED) gentoo-dev 2006-04-23 09:12:31 UTC
This was discussed on the portage-dev ml and decided on:

http://thread.gmane.org/gmane.linux.gentoo.portage.devel/2054/focus=2054

Short summary: NOTABUG