Re: [PATCH] Adjust mangling of "arch" value from scanelf output

Zac Medico <[email protected]> Wed, 23 Dec 2020 22:31:37 -0800
Newsgroups gmane.linux.gentoo.portage.devel
Message-ID <[email protected]>
On 12/23/20 7:34 PM, Mike Gilbert wrote:
> scanelf may generate output that looks like this:
> 
> ```
> UNKNOWN_TYPE;lib/firmware/ath10k/WCN3990/hw1.0/wlanmdsp.mbn;;  -  ;
> EM_ARM;lib/firmware/mediatek/mt8183/scp.img;;  -  ;
> ...
> ```
> 
> Previously, we removed the first 3 characters of the first field and
> stored this as the "arch" in NEEDED.ELF.2. This unintentionally
> changes "UNKNOWN_TYPE" to "NOWN_TYPE".
> 
> Instead, let's just remove the string "EM_" from the front.
> 
> Signed-off-by: Mike Gilbert <[email protected]>
> ---
>  bin/misc-functions.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
> index c2a16cbe0..d7009d7eb 100755
> --- a/bin/misc-functions.sh
> +++ b/bin/misc-functions.sh
> @@ -194,7 +194,7 @@ install_qa_check() {
>  			fi
>  
>  			echo "${obj} ${needed}"	>> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
> -			echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
> +			echo "${arch#EM_};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
>  		done }
>  
>  		[ -n "${QA_SONAME_NO_SYMLINK}" ] && \
> 

Look good. This won't cause any problems for portage since these files
are outside of the known multilib categories.
-- 
Thanks,
Zac
signature.asc (application/pgp-signature, 981 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQKTBAEBCgB9FiEE8OgXaltWzqgSupCu0HX7jBBKPSAFAl/kNcpfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEYw
RTgxNzZBNUI1NkNFQTgxMkJBOTBBRUQwNzVGQjhDMTA0QTNEMjAACgkQ0HX7jBBK
PSDFIQ//V6FI+YWF4qTn1lbFngDB4cPW4RszfCHVxBBE7Ncr2ZpsHUSEz+5m3rki
jktXqzbJgAJvT2Vja9lU/Rfxhq5rQ8e91tMDbL/WKaAOnkxxUByQJR7jleq17a/H
VKcNNUL6mnsImS4ZcIZJ4bXhSLWJCTSDWxKQ5GROtGYH9jVZrIZzne/Ch332Ni5w
/7x5nuTGOW9wWfI0ndrUhYfLgD2JKWKh+PC5GCBfovvRSlhxAwrUZ5ImQYWXlIoi
Qgqd+OmljheBqjBXYG6Qm6tp3K61sZvdPQvi9SojrzP/QI3YW8XjuIobVTw6e2Cb
eb2G8BLf+DK2n6sdrrFuG7qHGhr/b2hMbxlY2zaaAoybXz06HYmj5PNXSwymWngA
HlSQbP+fSbkB1qbUUcmEx48JJFq0qGKgPziKol4VZqNrDjdA/Skgdd541rERVr95
L+E/qE9ibnJDbipLvYJ64lgH37qzlMs/BO6Z/av0DeuCDImiWypQchrbbZPOY1bt
GNpVqYAWqcK3iI11e23nadfVS633Li6/TS86BKM+/vWkxv+OI8pdsDjBW9fYXCfw
k3S2Tlt65eESFhUiDQXc/zORstqP0IBEUHwFKYK1g3LJQvZ+Jh6jvKctzcbChvL7
kIXNuY6oZ5Ez3KXi8+j6AFqBat//eF+xiPTUEAf1wOO65tEVo7c=
=6iIj
-----END PGP SIGNATURE-----