Gentoo Archives: gentoo-dev

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

Attachments

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

Replies