From d95cd17b274c5c21e3c32f0c9722057fb94ff83d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Tue, 25 Feb 2025 12:33:56 +0100 Subject: [PATCH] app-alternatives/awk: Sync with Gentoo It's from Gentoo commit b755c5b977f6801b3083d3eb022746ec87e6002e. --- .../app-alternatives/awk/awk-4.ebuild | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild b/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild index bc74e2572c..2c26d9a417 100644 --- a/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild +++ b/sdk_container/src/third_party/portage-stable/app-alternatives/awk/awk-4.ebuild @@ -1,4 +1,4 @@ -# Copyright 2022-2023 Gentoo Authors +# Copyright 2022-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -10,7 +10,7 @@ ALTERNATIVES=( nawk:sys-apps/nawk ) -inherit app-alternatives +inherit app-alternatives eapi9-ver DESCRIPTION="/bin/awk and /usr/bin/awk symlinks" KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" @@ -49,18 +49,11 @@ pkg_preinst() { has_version "app-alternatives/awk[mawk]" && HAD_MAWK=1 - local v - for v in ${REPLACING_VERSIONS}; do - if ver_test "${v}" -lt 4; then - SHOW_MAWK_WARNING=1 - fi + ver_replacing -lt 4 && SHOW_MAWK_WARNING=1 - # if we are upgrading from a new enough version, leftover manpage - # symlink cleanup was done already - if ver_test "${v}" -ge 3; then - return - fi - done + # if we are upgrading from a new enough version, leftover manpage + # symlink cleanup was done already + ver_replacing -ge 3 && return # otherwise, remove leftover files/symlinks created by eselect-awk (sic!) shopt -s nullglob