Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o, Mike Gilbert <floppym@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] Adjust mangling of "arch" value from scanelf output
Date: Thu, 24 Dec 2020 06:31:42
Message-Id: 4af0d952-616f-1996-2772-25783f227b34@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] Adjust mangling of "arch" value from scanelf output by Mike Gilbert
1 On 12/23/20 7:34 PM, Mike Gilbert wrote:
2 > scanelf may generate output that looks like this:
3 >
4 > ```
5 > UNKNOWN_TYPE;lib/firmware/ath10k/WCN3990/hw1.0/wlanmdsp.mbn;; - ;
6 > EM_ARM;lib/firmware/mediatek/mt8183/scp.img;; - ;
7 > ...
8 > ```
9 >
10 > Previously, we removed the first 3 characters of the first field and
11 > stored this as the "arch" in NEEDED.ELF.2. This unintentionally
12 > changes "UNKNOWN_TYPE" to "NOWN_TYPE".
13 >
14 > Instead, let's just remove the string "EM_" from the front.
15 >
16 > Signed-off-by: Mike Gilbert <floppym@g.o>
17 > ---
18 > bin/misc-functions.sh | 2 +-
19 > 1 file changed, 1 insertion(+), 1 deletion(-)
20 >
21 > diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
22 > index c2a16cbe0..d7009d7eb 100755
23 > --- a/bin/misc-functions.sh
24 > +++ b/bin/misc-functions.sh
25 > @@ -194,7 +194,7 @@ install_qa_check() {
26 > fi
27 >
28 > echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
29 > - echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
30 > + echo "${arch#EM_};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
31 > done }
32 >
33 > [ -n "${QA_SONAME_NO_SYMLINK}" ] && \
34 >
35
36 Look good. This won't cause any problems for portage since these files
37 are outside of the known multilib categories.
38 --
39 Thanks,
40 Zac

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies