Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 35944 - ebuild.sh doesn't quote paths for shell commands
Summary: ebuild.sh doesn't quote paths for shell commands
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High normal
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2003-12-16 08:06 UTC by rob holland (RETIRED)
Modified: 2011-10-30 22:17 UTC (History)
0 users

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


Attachments
Adds quotes to lots of lines so that it should be safe to use dirs with spaces in (ebuild.sh.diff,12.06 KB, patch)
2003-12-17 09:18 UTC, rob holland (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rob holland (RETIRED) gentoo-dev 2003-12-16 08:06:00 UTC
ebuild.sh doesn't quote all paths in its shell commands.

dyn_package does several rm/mv without quoting the directory names:
mv ${PF}.tbz2 ${PKGDIR}/All
rather than
mv "${PF}.tbz2" "${PKGDIR}/All"

If it did the later it would mean portage would work with spaces in directory names such as PKGDIR.

This means I could do PKGDIR="/bleh/${CFLAGS}" in /etc/make.conf and it would but packages in a useful place for me. I would be a happy bunny :)

Seeing as this does nothing but improve compatibility and is relatively painless to do, could you please adjust the commands to quote paths? :)

Reproducible: Always
Steps to Reproduce:
1. PKGDIR="/path/${CFLAGS}/" in /etc/make.conf
2. emerge --buildpkg foo
3. portage breaks when mv warns about having too many/unsupported arguments as its being passed my unquote CFLAGS as part of the path.

Actual Results:  
package doesn't build properly
Comment 1 rob holland (RETIRED) gentoo-dev 2003-12-17 09:18:49 UTC
Created attachment 22363 [details, diff]
Adds quotes to lots of lines so that it should be safe to use dirs with spaces in
Comment 2 Nicholas Jones (RETIRED) gentoo-dev 2003-12-21 09:57:23 UTC
"blah/*" doesn't glob match.
"blah/"* does.

Modified and included.
Comment 3 rob holland (RETIRED) gentoo-dev 2004-01-09 13:46:51 UTC
fixed by carpaski