commit:     44adc055f62ccb3f6c6191513805438fd4b81ead
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Mon Sep 22 04:04:49 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Sep 22 11:28:20 2025 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=44adc055

isolated-functions.sh: drop the find0() fallback implementation

Presently, there are two implementations of find0(), one of which serves
to cover situations where the -files0-from option is unavailable,
thereby retaining compatibility with CI environments based on Ubuntu
22.04. As of the 11th September, said environments are based on Ubuntu
24.04. Therefore, the fallback implementation is no longer required.

See-also: ff6b048dfc3cbee134cda0cfdc1dada43d21d961
Bug: https://bugs.gentoo.org/957550
Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 bin/isolated-functions.sh | 28 ++++------------------------
 1 file changed, 4 insertions(+), 24 deletions(-)

diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh
index fdca233323..393a36ed64 100644
--- a/bin/isolated-functions.sh
+++ b/bin/isolated-functions.sh
@@ -681,30 +681,10 @@ contains_word() {
 # Invoke GNU find(1) in such a way that the paths to be searched are consumed
 # as a list of one or more null-terminated records from STDIN. The positional
 # parameters shall be conveyed verbatim and are guaranteed to be treated as
-# options and/or primaries, provided that the version of GNU findutils is 4.9.0
-# or greater. For older versions, no such guarantee is made.
-if printf '/\0' | find -files0-from - -maxdepth 0 &>/dev/null; then
-       find0() {
-               find -files0-from - "$@"
-       }
-else
-       # This is a temporary workaround for the GitHub CI runner, which
-       # suffers from an outdated version of findutils, per bug 957550.
-       find0() {
-               local -a opts paths
-
-               # All of -H, -L and -P are options. If specified, they must
-               # precede pathnames and primaries alike.
-               while [[ $1 == -[HLP] ]]; do
-                       opts+=("$1")
-                       shift
-               done
-               mapfile -td '' paths
-               if (( ${#paths[@]} )); then
-                       find "${opts[@]}" "${paths[@]}" "$@"
-               fi
-       }
-fi
+# options and/or primaries. This requires GNU findutils >=4.9.0.
+find0() {
+       find -files0-from - "$@"
+}
 
 # Consumes the standard input and attempts to parse it as the "configparser"
 # configuration file format that is native to python. Each key/value entry

Reply via email to