/[gentoo-x86]/eclass/eutils.eclass
Gentoo

Diff of /eclass/eutils.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.258 Revision 1.259
1# Copyright 1999-2006 Gentoo Foundation 1# Copyright 1999-2006 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.258 2006/11/02 21:13:47 nyhm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.259 2006/11/10 15:56:58 uberlord Exp $
4# 4#
5# This eclass is for general purpose functions that most ebuilds 5# This eclass is for general purpose functions that most ebuilds
6# have to implement themselves. 6# have to implement themselves.
7# 7#
8# NB: If you add anything, please comment it! 8# NB: If you add anything, please comment it!
1402 1402
1403 while [[ -n ${cdset[${i}]} ]] ; do 1403 while [[ -n ${cdset[${i}]} ]] ; do
1404 local dir=$(dirname ${cdset[${i}]}) 1404 local dir=$(dirname ${cdset[${i}]})
1405 local file=$(basename ${cdset[${i}]}) 1405 local file=$(basename ${cdset[${i}]})
1406 1406
1407 for mline in $(gawk '/(iso|cdrom|fs=cdfss)/ {print $2}' /proc/mounts) ; do 1407 local point= node= fs= foo=
1408 mline=$(echo -e ${mline}) 1408 while read point node fs foo ; do
1409 [[ -d ${mline}/${dir} ]] || continue 1409 [[ *" ${fs} "* != " cd9660 iso9660 " ]] && continue
1410 point=${point//\040/ }
1410 if [[ -n $(find "${mline}"/${dir} -maxdepth 1 -iname ${file}) ]] ; then 1411 [[ -z $(find "${point}/${dir}" -maxdepth 1 -iname "${file}") ]] && continue
1411 export CDROM_ROOT=${mline} 1412 export CDROM_ROOT=${point}
1412 export CDROM_SET=${i} 1413 export CDROM_SET=${i}
1413 export CDROM_MATCH=${cdset[${i}]} 1414 export CDROM_MATCH=${cdset[${i}]}
1414 return 1415 return
1415 fi 1416 done < <(get_mounts)
1416 done
1417 1417
1418 ((++i)) 1418 ((++i))
1419 done 1419 done
1420 1420
1421 echo 1421 echo

Legend:
Removed from v.1.258  
changed lines
  Added in v.1.259

  ViewVC Help
Powered by ViewVC 1.1.20