I first noticed this from an error in /usr/lib/portage/bin/doins. I looked at the source and saw lots of lines like: if [ -L $x ] and cp $x ${T} They should be: if [ -L "$x" ] and cp "$x" "${T}" With out the quotes files with spaces in their name will be treated as two parameters. eg: cp /path/to/file/with/some spaces in the name.txt /somewhere/else/ will try to copy 5 files to a directory, not one file into a directory. I only checked a few files in /usr/lib/portage/bin/* but all of the ones I looked at had this problem.
OK, we should fix this -- but -- our policy is not to install files with spaces in their names. Do any ebuilds have such files?
Not that I know of. I was trying to install a helper file for VMware that added menu items to kde. The file created be kmenuedit (or whatever it's called) gave it a space in the name and I didn't think to rename it. My workaround was to rename it without the space.
perhaps Bug 1957 is related to this ? the emerge fails because of spaces in a library configure option
Despite the policy of "no files with spaces in them" (which I don't agree with, but won't argue here), for safety' sake it's not a bad idea to robustify the scripts. If the scripts WARN that a file has spaces in it seems like a good middle ground to me. Additionally, while we're on the topic, I've noticed a few shortcomings with the other scripts (dodoc doesn't recurse, etc...). If I may suggest, a discussion on -dev for general script improvement and/or replacement might not be a bad idea.
Bash file globs being used to pass files might cause problems as "detecting" spaces is a non-trivial exercise. Using $* and $@ would be one of the major problems as it gets/gives a _space delimited_ list of arguments to for loops and other scripts... Thereby failing anything looking for spaces... I think the palm emulator is one that includes files with spaces. * app-emulation/pose [ Masked ] <--- That's it.
in cvs