1 |
W dniu pią, 05.01.2018 o godzinie 13∶13 +0000, użytkownik Lars Wendler |
2 |
napisał: |
3 |
> commit: 1e09cba657ccb2b8e6fbcbeb28c5c593da2127eb |
4 |
> Author: Gary Macindoe <gary <AT> garymacindoe <DOT> co <DOT> uk> |
5 |
> AuthorDate: Thu Sep 28 21:32:34 2017 +0000 |
6 |
> Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
7 |
> CommitDate: Fri Jan 5 13:13:40 2018 +0000 |
8 |
> URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e09cba6 |
9 |
> |
10 |
> Fix handling of multiple CDs |
11 |
> |
12 |
> Closes: https://github.com/gentoo/gentoo/pull/5818 |
13 |
> |
14 |
> eclass/cdrom.eclass | 12 +++++++++--- |
15 |
> 1 file changed, 9 insertions(+), 3 deletions(-) |
16 |
> |
17 |
> diff --git a/eclass/cdrom.eclass b/eclass/cdrom.eclass |
18 |
> index 47e2c6342e0..7b0eb9c6c3b 100644 |
19 |
> --- a/eclass/cdrom.eclass |
20 |
> +++ b/eclass/cdrom.eclass |
21 |
> @@ -71,7 +71,12 @@ fi |
22 |
> # eclass, see that function's description. |
23 |
> cdrom_get_cds() { |
24 |
> unset CDROM_SET |
25 |
> - export CDROM_CURRENT_CD=0 CDROM_CHECKS=( "${@}" ) |
26 |
> + export CDROM_CURRENT_CD=0 |
27 |
> + export CDROM_NUM_CDS="${#}" |
28 |
> + local i |
29 |
> + for i in $(seq ${#}); do |
30 |
> + export CDROM_CHECK_${i}="${!i}" |
31 |
> + done |
32 |
|
33 |
Please fix the indentation. |
34 |
|
35 |
> |
36 |
> # If the user has set CD_ROOT or CD_ROOT_1, don't bother informing |
37 |
> # them about which discs are needed as they presumably already know. |
38 |
> @@ -190,7 +195,8 @@ cdrom_load_next_cd() { |
39 |
> local i cdset |
40 |
> : CD_ROOT_${CDROM_CURRENT_CD} |
41 |
> export CDROM_ROOT=${CD_ROOT:-${!_}} |
42 |
> - IFS=: read -r -a cdset -d "" <<< "${CDROM_CHECKS[$((${CDROM_CURRENT_CD} - 1))]}" |
43 |
> + local var="CDROM_CHECK_${CDROM_CURRENT_CD}" |
44 |
> + IFS=: read -r -a cdset -d "" <<< "${!var}" |
45 |
> |
46 |
> for i in $(seq ${CDROM_SET:-0} ${CDROM_SET:-$((${#cdset[@]} - 1))}); do |
47 |
> local f=${cdset[${i}]} point= node= fs= opts= |
48 |
> @@ -222,7 +228,7 @@ cdrom_load_next_cd() { |
49 |
> fi |
50 |
> |
51 |
> if [[ ${showedmsg} -eq 0 ]] ; then |
52 |
> - if [[ ${#CDROM_CHECKS[@]} -eq 1 ]] ; then |
53 |
> + if [[ ${CDROM_NUM_CDS} -eq 1 ]] ; then |
54 |
> einfo "Please insert+mount the ${CDROM_NAME:-CD for ${PN}} now !" |
55 |
> else |
56 |
> local var="CDROM_NAME_${CDROM_CURRENT_CD}" |
57 |
> |
58 |
|
59 |
This looks like a major change which also pretty much reverts |
60 |
the direction the previous (ml-reviewed) patches took. As such, |
61 |
it would be really desirable to post it for review instead of stealthily |
62 |
committing to an eclass which -- as far as metadata says -- you aren't |
63 |
even maintainer of. |
64 |
|
65 |
-- |
66 |
Best regards, |
67 |
Michał Górny |