Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Thu, 27 Apr 2017 21:42:27
Message-Id: 1493329284.0f72535c23a2d0286001a849a39fa8543e1588f5.chewi@gentoo
1 commit: 0f72535c23a2d0286001a849a39fa8543e1588f5
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 16 10:20:11 2017 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 27 21:41:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f72535c
7
8 cdrom.eclass: The CDROM_TOTAL_CDS variable is redundant now
9
10 This was never formally declared by the eclass or used by ebuilds.
11
12 eclass/cdrom.eclass | 11 +++++------
13 1 file changed, 5 insertions(+), 6 deletions(-)
14
15 diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass
16 index 069f1b36258..a56ec62b785 100644
17 --- a/eclass/cdrom.eclass
18 +++ b/eclass/cdrom.eclass
19 @@ -52,7 +52,6 @@ cdrom_get_cds() {
20 # the # of files they gave us
21 local cdcnt=0
22 local f=
23 - export CDROM_TOTAL_CDS=${cdcnt}
24 export CDROM_CURRENT_CD=1 CDROM_CHECKS=( "${@}" )
25
26 # now we see if the user gave use CD_ROOT ...
27 @@ -60,7 +59,7 @@ cdrom_get_cds() {
28 if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
29 local var=
30 cdcnt=0
31 - while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
32 + while [[ ${cdcnt} -lt ${#} ]] ; do
33 ((++cdcnt))
34 var="CD_ROOT_${cdcnt}"
35 [[ -z ${!var} ]] && var="CD_ROOT"
36 @@ -68,7 +67,7 @@ cdrom_get_cds() {
37 eerror "You must either use just the CD_ROOT"
38 eerror "or specify ALL the CD_ROOT_X variables."
39 eerror "In this case, you will need" \
40 - "${CDROM_TOTAL_CDS} CD_ROOT_X variables."
41 + "${#} CD_ROOT_X variables."
42 die "could not locate CD_ROOT_${cdcnt}"
43 fi
44 done
45 @@ -86,7 +85,7 @@ cdrom_get_cds() {
46
47 # User didn't help us out so lets make sure they know they can
48 # simplify the whole process ...
49 - if [[ ${CDROM_TOTAL_CDS} -eq 1 ]] ; then
50 + if [[ ${#} -eq 1 ]] ; then
51 einfo "This ebuild will need the ${CDROM_NAME:-cdrom for ${PN}}"
52 echo
53 einfo "If you do not have the CD, but have the data files"
54 @@ -99,7 +98,7 @@ cdrom_get_cds() {
55 echo
56 else
57 _cdrom_set_names
58 - einfo "This package may need access to ${CDROM_TOTAL_CDS} cds."
59 + einfo "This package may need access to ${#} cds."
60 local cdcnt
61 for cdcnt in $(seq ${#}); do
62 local var=CDROM_NAME_${cdcnt}
63 @@ -189,7 +188,7 @@ _cdrom_locate_file_on_cd() {
64
65 echo
66 if [[ ${showedmsg} -eq 0 ]] ; then
67 - if [[ ${CDROM_TOTAL_CDS} -eq 1 ]] ; then
68 + if [[ ${#CDROM_CHECKS[@]} -eq 1 ]] ; then
69 if [[ -z ${CDROM_NAME} ]] ; then
70 einfo "Please insert+mount the cdrom for ${PN} now !"
71 else