Gentoo Archives: gentoo-dev

From: James Le Cuirot <chewi@g.o>
To: gentoo-dev <gentoo-dev@l.g.o>
Cc: James Le Cuirot <chewi@g.o>
Subject: [gentoo-dev] [PATCH 12/14] cdrom.eclass: Use consistent terminology in prompts and messages
Date: Mon, 17 Apr 2017 22:06:16
Message-Id: 20170417215359.30641-13-chewi@gentoo.org
In Reply to: [gentoo-dev] [PATCH] cdrom.eclass: Near rewrite by James Le Cuirot
1 ---
2 eclass/cdrom.eclass | 28 ++++++++++++----------------
3 1 file changed, 12 insertions(+), 16 deletions(-)
4
5 diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass
6 index f4ea2ff36400..36d967d2f4cd 100644
7 --- a/eclass/cdrom.eclass
8 +++ b/eclass/cdrom.eclass
9 @@ -58,7 +58,7 @@ cdrom_get_cds() {
10
11 # Single disc info.
12 elif [[ ${#} -eq 1 ]] ; then
13 - einfo "This ebuild will need the ${CDROM_NAME:-cdrom for ${PN}}"
14 + einfo "This ebuild will need the ${CDROM_NAME:-CD for ${PN}}"
15 echo
16 einfo "If you do not have the CD, but have the data files"
17 einfo "mounted somewhere on your filesystem, just export"
18 @@ -72,7 +72,7 @@ cdrom_get_cds() {
19 # Multi disc info.
20 else
21 _cdrom_set_names
22 - einfo "This package may need access to ${#} cds."
23 + einfo "This package may need access to ${#} CDs."
24 local cdcnt
25 for cdcnt in $(seq ${#}); do
26 local var=CDROM_NAME_${cdcnt}
27 @@ -85,7 +85,7 @@ cdrom_get_cds() {
28 einfo $(printf "CD_ROOT_%d " $(seq ${#}))
29 echo
30 einfo "Or, if you have all the files in the same place, or"
31 - einfo "you only have one cdrom, you can export CD_ROOT"
32 + einfo "you only have one CD, you can export CD_ROOT"
33 einfo "and that place will be used as the same data source"
34 einfo "for all the CDs."
35 echo
36 @@ -150,31 +150,27 @@ cdrom_load_next_cd() {
37 die "unable to locate CD #${CDROM_CURRENT_CD} root at ${CDROM_ROOT}"
38 fi
39
40 - echo
41 if [[ ${showedmsg} -eq 0 ]] ; then
42 if [[ ${#CDROM_CHECKS[@]} -eq 1 ]] ; then
43 - if [[ -z ${CDROM_NAME} ]] ; then
44 - einfo "Please insert+mount the cdrom for ${PN} now !"
45 - else
46 - einfo "Please insert+mount the ${CDROM_NAME} cdrom now !"
47 - fi
48 + einfo "Please insert+mount the ${CDROM_NAME:-CD for ${PN}} now !"
49 else
50 - if [[ -z ${CDROM_NAME_1} ]] ; then
51 - einfo "Please insert+mount cd #${CDROM_CURRENT_CD}" \
52 - "for ${PN} now !"
53 + local var="CDROM_NAME_${CDROM_CURRENT_CD}"
54 + if [[ -z ${!var} ]] ; then
55 + einfo "Please insert+mount CD #${CDROM_CURRENT_CD} for ${PN} now !"
56 else
57 - local var="CDROM_NAME_${CDROM_CURRENT_CD}"
58 - einfo "Please insert+mount the ${!var} cdrom now !"
59 + einfo "Please insert+mount the ${!var} now !"
60 fi
61 fi
62 showedmsg=1
63 fi
64 - einfo "Press return to scan for the cd again"
65 +
66 + einfo "Press return to scan for the CD again"
67 einfo "or hit CTRL+C to abort the emerge."
68 - echo
69 +
70 if [[ ${showjolietmsg} -eq 0 ]] ; then
71 showjolietmsg=1
72 else
73 + echo
74 ewarn "If you are having trouble with the detection"
75 ewarn "of your CD, it is possible that you do not have"
76 ewarn "Joliet support enabled in your kernel. Please"
77 --
78 2.11.0