1 |
commit: 5ee55de6c7547a68327cb3d57cd0e536d40b41e7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 31 12:36:01 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 31 16:35:29 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5ee55de6 |
7 |
|
8 |
Detect and report incorrect use of <stabilize-allarches/> |
9 |
|
10 |
Report a QA warning when <stabilize-allarches/> is used on a package |
11 |
installing ELF files. We can easily check this through presence of |
12 |
(non-empty) NEEDED build-info files. |
13 |
|
14 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
15 |
Reviewed-by: Zac Medico <zmedico <AT> gentoo.org> |
16 |
Closes: https://github.com/gentoo/portage/pull/723 |
17 |
|
18 |
bin/misc-functions.sh | 13 +++++++++---- |
19 |
1 file changed, 9 insertions(+), 4 deletions(-) |
20 |
|
21 |
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh |
22 |
index d7009d7eb..ddf53beea 100755 |
23 |
--- a/bin/misc-functions.sh |
24 |
+++ b/bin/misc-functions.sh |
25 |
@@ -201,10 +201,15 @@ install_qa_check() { |
26 |
echo "${QA_SONAME_NO_SYMLINK}" > \ |
27 |
"${PORTAGE_BUILDDIR}"/build-info/QA_SONAME_NO_SYMLINK |
28 |
|
29 |
- if has binchecks ${RESTRICT} && \ |
30 |
- [ -s "${PORTAGE_BUILDDIR}/build-info/NEEDED.ELF.2" ] ; then |
31 |
- eqawarn "QA Notice: RESTRICT=binchecks prevented checks on these ELF files:" |
32 |
- eqawarn "$(while read -r x; do x=${x#*;} ; x=${x%%;*} ; echo "${x#${EPREFIX}}" ; done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2)" |
33 |
+ if [[ -s ${PORTAGE_BUILDDIR}/build-info/NEEDED.ELF.2 ]]; then |
34 |
+ if grep -qs '<stabilize-allarches/>' "${EBUILD%/*}/metadata.xml"; then |
35 |
+ eqawarn "QA Notice: stabilize-allarches/> found on package installing ELF files" |
36 |
+ fi |
37 |
+ |
38 |
+ if has binchecks ${RESTRICT}; then |
39 |
+ eqawarn "QA Notice: RESTRICT=binchecks prevented checks on these ELF files:" |
40 |
+ eqawarn "$(while read -r x; do x=${x#*;} ; x=${x%%;*} ; echo "${x#${EPREFIX}}" ; done < "${PORTAGE_BUILDDIR}"/build-info/NEEDED.ELF.2)" |
41 |
+ fi |
42 |
fi |
43 |
fi |