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:28:02
Message-Id: 20120118212845.7f7a0b70@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 15:16:02 -0500
2 Mike Frysinger <vapier@g.o> wrote:
3
4 > On Wednesday 18 January 2012 15:14:05 Michał Górny wrote:
5 > > On Wed, 18 Jan 2012 14:29:27 -0500 Mike Frysinger wrote:
6 > > > On Wednesday 18 January 2012 14:11:14 Michał Górny wrote:
7 > > > > On Wed, 18 Jan 2012 09:48:59 -0500 Mike Frysinger wrote:
8 > > > > > On Wednesday 18 January 2012 08:39:04 Michał Górny wrote:
9 > > > > > > On Wed, 18 Jan 2012 06:22:24 -0500 Mike Frysinger wrote:
10 > > > > > > > > > # now we see if the user gave use CD_ROOT ...
11 > > > > > > > > > # if they did, let's just believe them that
12 > > > > > > > > > it's
13 > > > > > > > > >
14 > > > > > > > > > correct if [[ -n ${CD_ROOT}${CD_ROOT_1} ]] ; then
15 > > > > > > > > >
16 > > > > > > > > > local var=
17 > > > > > > > > > cdcnt=0
18 > > > > > > > > > while [[ ${cdcnt} -lt
19 > > > > > > > > > ${CDROM_TOTAL_CDS}
20 > > > > > > > > >
21 > > > > > > > > > ]] ; do ((++cdcnt))
22 > > > > > > > > >
23 > > > > > > > > > var="CD_ROOT_${cdcnt}"
24 > > > > > > > > > [[ -z ${!var} ]] &&
25 > > > > > > > > > var="CD_ROOT" if [[ -z ${!var} ]] ; then
26 > > > > > > > > >
27 > > > > > > > > > eerror "You must
28 > > > > > > > > > either
29 > > > > > > > > >
30 > > > > > > > > > use just the CD_ROOT" eerror "or specify ALL the
31 > > > > > > > > > CD_ROOT_X variables." eerror "In this case, you will
32 > > > > > > > > > need" \ "${CDROM_TOTAL_CDS} CD_ROOT_X
33 > > > > > > > > > variables." die "could not locate CD_ROOT_${cdcnt}"
34 > > > > > > > > >
35 > > > > > > > > > fi
36 > > > > > > > > >
37 > > > > > > > > > done
38 > > > > > > > > > export
39 > > > > > > > > > CDROM_ROOT=${CD_ROOT_1:-${CD_ROOT}} einfo "Found CD
40 > > > > > > > > > #${CDROM_CURRENT_CD} root
41 > > > > > > > > >
42 > > > > > > > > > at ${CDROM_ROOT}"
43 > > > > > > > >
44 > > > > > > > > #1. You are using 1 in variable calls, I don't see a
45 > > > > > > > > reason to use longer ${CDROM_CURRENT_CD} in this one
46 > > > > > > > > output case.
47 > > > > > > >
48 > > > > > > > i don't know what you mean
49 > > > > > >
50 > > > > > > einfo "Found CD #1 root at ..."
51 > > > > >
52 > > > > > *shrug* i preferred the # in the output
53 > > > >
54 > > > > I don't get what you mean. I just say it's pointless to use
55 > > > > ${CDROM_CURRENT_CD} here.
56 > > >
57 > > > in multi cd sets, it keeps thing clearer imo at little cost
58 > >
59 > > Consdiering that you always use ${CD_ROOT_1}?
60 >
61 > yes. i want to see the disc # and path.
62
63 But isn't CDROM_CURRENT_ID always 1 there?
64
65 --
66 Best regards,
67 Michał Górny

Attachments

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

Replies