this should work better

This commit is contained in:
Rick Farina (Zero_Chaos) 2025-12-12 19:43:41 -05:00
parent e577a361a1
commit 7cebd91e7a
No known key found for this signature in database
GPG key ID: A29433C0AA431DDC

View file

@ -3,12 +3,11 @@ FAILED="0"
for i in $(git --no-pager diff --name-only "$(git rev-parse --verify origin/master 2> /dev/null)" HEAD); do
if [ "${i%.ebuild}" != "${i}" ]; then
printf "%s looks like an ebuild, testing\n" "${i}"
if FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" ACCEPT_KEYWORDS="~amd64" emerge --getbinpkg=y --buildpkg=n --jobs="$(nproc)" --load-average="$(nproc)" --verbose "$(printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3}')" --pretend; then
# This will test arch and ~arch but not no keywords
printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3"}' >> /etc/portage/package.accept_keywords
if FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" emerge --getbinpkg=y --buildpkg=n --jobs="$(nproc)" --load-average="$(nproc)" --verbose "$(printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3}')" --pretend; then
printf '%s appears to be unmasked, build testing' "${i}"
printf 'building deps for %s' "${i}"
FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" emerge --getbinpkg=y --buildpkg=n --jobs="$(nproc)" --load-average="$(nproc)" --verbose "$(printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3}')" --onlydeps
printf '%s building now' "${i}"
if FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" ACCEPT_KEYWORDS="~amd64" emerge --getbinpkg=y --buildpkg=n --jobs="$(nproc)" --load-average="$(nproc)" --verbose "$(printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3}')"; then
if FEATURES="-ipc-sandbox -network-sandbox -pid-sandbox" emerge --getbinpkg=y --buildpkg=n --jobs="$(nproc)" --load-average="$(nproc)" --verbose "$(printf '%s' "${i%.ebuild}" | awk -F'/' '{print "="$1"/"$3}')"; then
printf '%s build SUCCESS\n' "${i}"
else
printf '%s build FAILED\n' "${i}"