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