Gentoo Archives: gentoo-dev

From: Mike Pagano <mpagano@g.o>
To: gentoo-dev@l.g.o
Cc: steven.stallion@××××.com
Subject: Re: [gentoo-dev] [PATCH] linux-mod.eclass: Fix MODULESD_* for hyphenated modules (bug #889752)
Date: Fri, 06 Jan 2023 13:04:00
Message-Id: 4cc8e0c0-5e85-fdbc-1864-4fe2725f67ee@gentoo.org
In Reply to: [gentoo-dev] [PATCH] linux-mod.eclass: Fix MODULESD_* for hyphenated modules (bug #889752) by Patrick McLean
1 On 1/4/23 19:06, Patrick McLean wrote:
2 > From: Steven Stallion <steven.stallion@××××.com>
3 >
4 > Use of the MODULESD_<modulename>_{ADDITIONS,ALIASES,EXAMPLES} variables do not
5 > currently work with external modules that are hyphenated. The current behavior
6 > results in an invalid modprobe.d file containing partially evaluated content.
7 >
8 > This appears to be due to use of ${currm} rather than ${currm_t} when
9 > Referencing variables. This changes the use of ${currm} to ${currm_t} when
10 > referencing variables to resolve this issue.
11 >
12 > Closes: https://bugs.gentoo.org/889752
13 > ---
14 > eclass/linux-mod.eclass | 8 ++++----
15 > 1 file changed, 4 insertions(+), 4 deletions(-)
16 >
17 > diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
18 > index d14bbf7d9ea..6cf9969b19a 100644
19 > --- a/eclass/linux-mod.eclass
20 > +++ b/eclass/linux-mod.eclass
21 > @@ -408,7 +408,7 @@ generate_modulesd() {
22 >
23 > for((t=0; t<${module_aliases}; t++))
24 > do
25 > - echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \
26 > + echo "alias $(eval echo \${MODULESD_${currm_t}_ALIASES[$t]})" \
27 > >> "${module_config}"
28 > done
29 > echo '' >> "${module_config}"
30 > @@ -434,7 +434,7 @@ generate_modulesd() {
31 > fi
32 >
33 > #-----------------------------------------------------------------------
34 > - if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]]; then
35 > + if [[ $(eval echo \${MODULESD_${currm_t}_ALIASES[0]}) == guess ]]; then
36 > # So, let's do some guesswork, eh?
37 > if [[ -n ${module_opts} ]]; then
38 > echo "# For Example..." >> "${module_config}"
39 > @@ -449,7 +449,7 @@ generate_modulesd() {
40 > echo "# For Example..." >> "${module_config}"
41 > echo "# --------------" >> "${module_config}"
42 > for ((t=0; t<${module_examples}; t++)); do
43 > - echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \
44 > + echo "options $(eval echo \${MODULESD_${currm_t}_EXAMPLES[$t]})" \
45 > >> "${module_config}"
46 > done
47 > echo '' >> "${module_config}"
48 > @@ -458,7 +458,7 @@ generate_modulesd() {
49 > #-----------------------------------------------------------------------
50 > if [[ ${module_additions} -gt 0 ]]; then
51 > for ((t=0; t<${module_additions}; t++)); do
52 > - echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \
53 > + echo "$(eval echo \${MODULESD_${currm_t}_ADDITIONS[$t]})" \
54 > >> "${module_config}"
55 > done
56 > echo '' >> "${module_config}"
57
58
59 Ack
60
61 --
62 Mike Pagano
63 Gentoo Developer - Kernel Project
64 E-Mail : mpagano@g.o
65 GnuPG FP : 52CC A0B0 F631 0B17 0142 F83F 92A6 DBEC 81F2 B137
66 Public Key : http://pgp.mit.edu/pks/lookup?search=0x92A6DBEC81F2B137&op=index

Replies