From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E9AED15800F for ; Thu, 12 Jan 2023 06:51:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 643EAE092C; Thu, 12 Jan 2023 06:51:47 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 23E4FE0922 for ; Thu, 12 Jan 2023 06:51:47 +0000 (UTC) Date: Thu, 12 Jan 2023 15:51:40 +0900 From: alicef_gentoo To: gentoo-dev@lists.gentoo.org Cc: steven.stallion@sony.com Subject: Re: [gentoo-dev] [PATCH] linux-mod.eclass: Fix MODULESD_* for hyphenated modules (bug #889752) Message-ID: <20230112065140.5folktgjv4ryezfz@alicef-pc> References: <20230105000643.1313451-1-chutzpah@gentoo.org> <4cc8e0c0-5e85-fdbc-1864-4fe2725f67ee@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4cc8e0c0-5e85-fdbc-1864-4fe2725f67ee@gentoo.org> X-Archives-Salt: 6f503a08-37e5-42d4-8e08-cea241c11557 X-Archives-Hash: 37a66b03d1f38f8e2643c9775f60f82a On Fri, Jan 06, 2023 at 08:03:51AM -0500, Mike Pagano wrote: > On 1/4/23 19:06, Patrick McLean wrote: > > From: Steven Stallion > > > > Use of the MODULESD__{ADDITIONS,ALIASES,EXAMPLES} variables do not > > currently work with external modules that are hyphenated. The current behavior > > results in an invalid modprobe.d file containing partially evaluated content. > > > > This appears to be due to use of ${currm} rather than ${currm_t} when > > Referencing variables. This changes the use of ${currm} to ${currm_t} when > > referencing variables to resolve this issue. > > > > Closes: https://bugs.gentoo.org/889752 > > --- > > eclass/linux-mod.eclass | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass > > index d14bbf7d9ea..6cf9969b19a 100644 > > --- a/eclass/linux-mod.eclass > > +++ b/eclass/linux-mod.eclass > > @@ -408,7 +408,7 @@ generate_modulesd() { > > for((t=0; t<${module_aliases}; t++)) > > do > > - echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \ > > + echo "alias $(eval echo \${MODULESD_${currm_t}_ALIASES[$t]})" \ > > >> "${module_config}" > > done > > echo '' >> "${module_config}" > > @@ -434,7 +434,7 @@ generate_modulesd() { > > fi > > #----------------------------------------------------------------------- > > - if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]]; then > > + if [[ $(eval echo \${MODULESD_${currm_t}_ALIASES[0]}) == guess ]]; then > > # So, let's do some guesswork, eh? > > if [[ -n ${module_opts} ]]; then > > echo "# For Example..." >> "${module_config}" > > @@ -449,7 +449,7 @@ generate_modulesd() { > > echo "# For Example..." >> "${module_config}" > > echo "# --------------" >> "${module_config}" > > for ((t=0; t<${module_examples}; t++)); do > > - echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \ > > + echo "options $(eval echo \${MODULESD_${currm_t}_EXAMPLES[$t]})" \ > > >> "${module_config}" > > done > > echo '' >> "${module_config}" > > @@ -458,7 +458,7 @@ generate_modulesd() { > > #----------------------------------------------------------------------- > > if [[ ${module_additions} -gt 0 ]]; then > > for ((t=0; t<${module_additions}; t++)); do > > - echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \ > > + echo "$(eval echo \${MODULESD_${currm_t}_ADDITIONS[$t]})" \ > > >> "${module_config}" > > done > > echo '' >> "${module_config}" > > > Ack > Ack Thanks, Alicef