summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-03-04 02:26:24 +0000
committerZac Medico <zmedico@gentoo.org>2009-03-04 02:26:24 +0000
commit5b160087c86917d3f93f4b568392f77c99273dd4 (patch)
tree562d268840d9a21bac91e22ddd1b91831de58def
parenta517752edabe43a429ea4687d0fbb7516645ac1d (diff)
downloadportage-5b160087c86917d3f93f4b568392f77c99273dd4.tar.gz
portage-5b160087c86917d3f93f4b568392f77c99273dd4.tar.bz2
portage-5b160087c86917d3f93f4b568392f77c99273dd4.zip
Fix vdb entry writting code in dyn_install() to avoid generating empty entries
in some cases. Thanks to Ned Ludd <solar@g.o> for reporting. svn path=/main/trunk/; revision=12745
-rwxr-xr-xbin/ebuild.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/ebuild.sh b/bin/ebuild.sh
index d4bceae40..dac55a211 100755
--- a/bin/ebuild.sh
+++ b/bin/ebuild.sh
@@ -1003,14 +1003,15 @@ dyn_install() {
cd "${PORTAGE_BUILDDIR}"/build-info
set -f
- local f
+ local f x
+ IFS=$' \t\n\r'
for f in ASFLAGS CATEGORY CBUILD CC CFLAGS CHOST CTARGET CXX \
CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \
FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS \
LICENSE PDEPEND PF PKGUSE PROPERTIES PROVIDE RDEPEND RESTRICT SLOT \
KEYWORDS HOMEPAGE SRC_URI DESCRIPTION; do
- [ -n "${!f}" ] && echo $(echo "${!f}" | \
- tr '\n,\r,\t' ' , , ' | sed s/' \+'/' '/g) > ${f}
+ x=$(echo -n ${!f})
+ [[ -n $x ]] && echo "$x" > $f
done
echo "${USE}" > USE
echo "${EAPI:-0}" > EAPI