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

Diff of /eclass/eutils.eclass

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

Revision 1.242 Revision 1.243
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.242 2006/06/24 04:36:33 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.243 2006/07/05 01:16:18 vapier 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!
1242# and when the function returns, you can assume that the cd has been 1242# and when the function returns, you can assume that the cd has been
1243# found at CDROM_ROOT. 1243# found at CDROM_ROOT.
1244# 1244#
1245# normally the cdrom functions will refer to the cds as 'cd #1', 'cd #2', 1245# normally the cdrom functions will refer to the cds as 'cd #1', 'cd #2',
1246# etc... if you want to give the cds better names, then just export 1246# etc... if you want to give the cds better names, then just export
1247# the CDROM_NAME_X variables before calling cdrom_get_cds(). 1247# the appropriate CDROM_NAME variable before calling cdrom_get_cds().
1248# - CDROM_NAME="fooie cd" - for when you only want 1 cd
1249# - CDROM_NAME_1="install cd" - for when you want more than 1 cd
1250# CDROM_NAME_2="data cd"
1251# - CDROM_NAME_SET=( "install cd" "data cd" ) - short hand for CDROM_NAME_#
1248# 1252#
1249# for those multi cd ebuilds, see the cdrom_load_next_cd() below. 1253# for those multi cd ebuilds, see the cdrom_load_next_cd() below.
1250# 1254#
1251# Usage: cdrom_get_cds <file on cd1> [file on cd2] [file on cd3] [...] 1255# Usage: cdrom_get_cds <file on cd1> [file on cd2] [file on cd3] [...]
1252# - this will attempt to locate a cd based upon a file that is on 1256# - this will attempt to locate a cd based upon a file that is on
1303 echo 1307 echo
1304 einfo "For example:" 1308 einfo "For example:"
1305 einfo "export CD_ROOT=/mnt/cdrom" 1309 einfo "export CD_ROOT=/mnt/cdrom"
1306 echo 1310 echo
1307 else 1311 else
1312 if [[ -n ${CDROM_NAME_SET} ]] ; then
1313 # Translate the CDROM_NAME_SET array into CDROM_NAME_#
1314 cdcnt=0
1315 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
1316 ((++cdcnt))
1317 export CDROM_NAME_${cdcnt}="${CDROM_NAME_SET[$((${cdcnt}-1))]}"
1318 done
1319 fi
1320
1308 einfo "This package will need access to ${CDROM_TOTAL_CDS} cds." 1321 einfo "This package will need access to ${CDROM_TOTAL_CDS} cds."
1309 cdcnt=0 1322 cdcnt=0
1310 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do 1323 while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
1311 ((++cdcnt)) 1324 ((++cdcnt))
1312 var="CDROM_NAME_${cdcnt}" 1325 var="CDROM_NAME_${cdcnt}"

Legend:
Removed from v.1.242  
changed lines
  Added in v.1.243

  ViewVC Help
Powered by ViewVC 1.1.20