Skip to content

Commit

Permalink
Detect and report incorrect use of <stabilize-allarches/>
Browse files Browse the repository at this point in the history
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@gentoo.org>
Reviewed-by: Zac Medico <zmedico@gentoo.org>
Closes: #723
  • Loading branch information
mgorny committed May 31, 2021
1 parent a429f74 commit 5ee55de
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bin/misc-functions.sh
Expand Up @@ -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

Expand Down

0 comments on commit 5ee55de

Please sign in to comment.