Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: RFD: split out some functions from eutils.eclass?
Date: Wed, 18 Jan 2012 19:30:01
Message-Id: 201201181429.27864.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] Re: RFD: split out some functions from eutils.eclass? by "Michał Górny"
1 On Wednesday 18 January 2012 14:11:14 Michał Górny wrote:
2 > On Wed, 18 Jan 2012 09:48:59 -0500 Mike Frysinger wrote:
3 > > On Wednesday 18 January 2012 08:39:04 Michał Górny wrote:
4 > > > On Wed, 18 Jan 2012 06:22:24 -0500 Mike Frysinger wrote:
5 > > > > > > # now we see if the user gave use CD_ROOT ...
6 > > > > > > # if they did, let's just believe them that it's
7 > > > > > >
8 > > > > > > correct if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
9 > > > > > > local var=
10 > > > > > > cdcnt=0
11 > > > > > > while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ;
12 > > > > > > do ((++cdcnt))
13 > > > > > > var="CD_ROOT_${cdcnt}"
14 > > > > > > [[ -z ${!var} ]] && var="CD_ROOT"
15 > > > > > > if [[ -z ${!var} ]] ; then
16 > > > > > >
17 > > > > > > eerror "You must either use
18 > > > > > > just the CD_ROOT" eerror "or specify ALL the CD_ROOT_X
19 > > > > > > variables." eerror "In this case, you will
20 > > > > > > need" \ "${CDROM_TOTAL_CDS} CD_ROOT_X
21 > > > > > > variables." die "could not locate CD_ROOT_${cdcnt}"
22 > > > > > > fi
23 > > > > > > done
24 > > > > > > export CDROM_ROOT=${CD_ROOT_1:-${CD_ROOT}}
25 > > > > > > einfo "Found CD #${CDROM_CURRENT_CD} root at
26 > > > > > > ${CDROM_ROOT}"
27 > > > > >
28 > > > > > #1. You are using 1 in variable calls, I don't see a reason to
29 > > > > > use longer ${CDROM_CURRENT_CD} in this one output case.
30 > > > >
31 > > > > i don't know what you mean
32 > > >
33 > > > einfo "Found CD #1 root at ..."
34 > >
35 > > *shrug* i preferred the # in the output
36 >
37 > I don't get what you mean. I just say it's pointless to use
38 > ${CDROM_CURRENT_CD} here.
39
40 in multi cd sets, it keeps thing clearer imo at little cost
41 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] Re: RFD: split out some functions from eutils.eclass? "Michał Górny" <mgorny@g.o>