cdrom.eclass: Rename CDROM_NAME_SET array to CDROM_NAMES
authorJames Le Cuirot <chewi@gentoo.org>
Sun, 16 Apr 2017 09:44:25 +0000 (10:44 +0100)
committerJames Le Cuirot <chewi@gentoo.org>
Thu, 27 Apr 2017 21:41:22 +0000 (22:41 +0100)
vapier seemed confused about what he wanted this variable to do as can
be seen in bug #139196. The eclass used it for the names of each disc,
regardless of the set, while ebuilds used it for the name of each
single-disc set. This was not helped by the fact that the set feature
has been totally undocumented. The former behaviour makes more sense
so let's rename the array to something less confusing.

This will not break ebuilds already using CDROM_NAME_SET. As they all
use just a single disc, they currently do not display the names given
in this variable anyway.

eclass/cdrom.eclass

index 4c4922fe3417fefdcd4a07bb5ed6795902d3049f..29418ecb1a86c4ddc41ff20634cff52e7c51a339 100644 (file)
@@ -44,7 +44,7 @@ fi
 # etc...  If you want to give the cds better names, then just export
 # the appropriate CDROM_NAME variable before calling cdrom_get_cds().
 # Use CDROM_NAME for one cd, or CDROM_NAME_# for multiple cds.  You can
-# also use the CDROM_NAME_SET bash array.
+# also use the CDROM_NAMES bash array.
 #
 # For those multi cd ebuilds, see the cdrom_load_next_cd() function.
 cdrom_get_cds() {
@@ -102,12 +102,12 @@ cdrom_get_cds() {
                einfo "export CD_ROOT=/mnt/cdrom"
                echo
        else
-               if [[ -n ${CDROM_NAME_SET} ]] ; then
-                       # Translate the CDROM_NAME_SET array into CDROM_NAME_#
+               if [[ -n ${CDROM_NAMES} ]] ; then
+                       # Translate the CDROM_NAMES array into CDROM_NAME_#
                        cdcnt=0
                        while [[ ${cdcnt} -lt ${CDROM_TOTAL_CDS} ]] ; do
                                ((++cdcnt))
-                               export CDROM_NAME_${cdcnt}="${CDROM_NAME_SET[$((${cdcnt}-1))]}"
+                               export CDROM_NAME_${cdcnt}="${CDROM_NAMES[$((${cdcnt}-1))]}"
                        done
                fi