Gentoo Archives: gentoo-portage-dev

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