Gentoo Archives: gentoo-portage-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-portage-dev@l.g.o
Cc: Mike Gilbert <floppym@g.o>
Subject: [gentoo-portage-dev] [PATCH] Adjust mangling of "arch" value from scanelf output
Date: Thu, 24 Dec 2020 03:36:18
Message-Id: 20201224033437.116645-1-floppym@gentoo.org
1 scanelf may generate output that looks like this:
2
3 ```
4 UNKNOWN_TYPE;lib/firmware/ath10k/WCN3990/hw1.0/wlanmdsp.mbn;; - ;
5 EM_ARM;lib/firmware/mediatek/mt8183/scp.img;; - ;
6 ...
7 ```
8
9 Previously, we removed the first 3 characters of the first field and
10 stored this as the "arch" in NEEDED.ELF.2. This unintentionally
11 changes "UNKNOWN_TYPE" to "NOWN_TYPE".
12
13 Instead, let's just remove the string "EM_" from the front.
14
15 Signed-off-by: Mike Gilbert <floppym@g.o>
16 ---
17 bin/misc-functions.sh | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
21 index c2a16cbe0..d7009d7eb 100755
22 --- a/bin/misc-functions.sh
23 +++ b/bin/misc-functions.sh
24 @@ -194,7 +194,7 @@ install_qa_check() {
25 fi
26
27 echo "${obj} ${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED
28 - echo "${arch:3};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
29 + echo "${arch#EM_};${obj};${soname};${rpath};${needed}" >> "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2
30 done }
31
32 [ -n "${QA_SONAME_NO_SYMLINK}" ] && \
33 --
34 2.30.0.rc1

Replies