diff options
author | Tristan Heaven <nyhm@gentoo.org> | 2006-11-02 21:13:47 +0000 |
---|---|---|
committer | Tristan Heaven <nyhm@gentoo.org> | 2006-11-02 21:13:47 +0000 |
commit | 4f4850c6f82fe27527b7e7d6d3151b7b55885fd9 (patch) | |
tree | 72f9fe99ac2c2582f087ffa351c99b9673e42490 /eclass | |
parent | version bump (diff) | |
download | gentoo-2-4f4850c6f82fe27527b7e7d6d3151b7b55885fd9.tar.gz gentoo-2-4f4850c6f82fe27527b7e7d6d3151b7b55885fd9.tar.bz2 gentoo-2-4f4850c6f82fe27527b7e7d6d3151b7b55885fd9.zip |
_cdrom_locate_file_on_cd: Handle whitespace in mount points
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/eutils.eclass | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index 25b93b535a66..91f24feb75da 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.257 2006/11/01 23:46:17 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.258 2006/11/02 21:13:47 nyhm Exp $ # # This eclass is for general purpose functions that most ebuilds # have to implement themselves. @@ -1404,9 +1404,10 @@ _cdrom_locate_file_on_cd() { local dir=$(dirname ${cdset[${i}]}) local file=$(basename ${cdset[${i}]}) - for mline in $(mount | gawk '/(iso|cdrom|fs=cdfss)/ {print $3}') ; do + for mline in $(gawk '/(iso|cdrom|fs=cdfss)/ {print $2}' /proc/mounts) ; do + mline=$(echo -e ${mline}) [[ -d ${mline}/${dir} ]] || continue - if [[ -n $(find ${mline}/${dir} -maxdepth 1 -iname ${file}) ]] ; then + if [[ -n $(find "${mline}"/${dir} -maxdepth 1 -iname ${file}) ]] ; then export CDROM_ROOT=${mline} export CDROM_SET=${i} export CDROM_MATCH=${cdset[${i}]} |