Explorar o código

replace run-parts with find|sort to avoid debianutils usage

After e75e5879 the reason for an implicit dependency on debianutils
(which is essential for debian, but likely not on other systems) was
just two uses of run-parts, which can be replaced with the a lot more
portable find-piped-into-sort duo.
David Kalnischkies %!s(int64=10) %!d(string=hai) anos
pai
achega
804419029a
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      cmdline/apt-key.in
  2. 1 1
      test/integration/run-tests

+ 1 - 1
cmdline/apt-key.in

@@ -220,7 +220,7 @@ foreach_keyring_do() {
 	    if [ "${STRIPPED_TRUSTEDPARTS}/" = "$TRUSTEDPARTS" ]; then
 	    if [ "${STRIPPED_TRUSTEDPARTS}/" = "$TRUSTEDPARTS" ]; then
 		TRUSTEDPARTS="$STRIPPED_TRUSTEDPARTS"
 		TRUSTEDPARTS="$STRIPPED_TRUSTEDPARTS"
 	    fi
 	    fi
-	    for trusted in $(run-parts --list "$TRUSTEDPARTS" --regex '^.*\.gpg$'); do
+	    for trusted in $(find "$TRUSTEDPARTS" -mindepth 1 -maxdepth 1 -regex '^.*\.gpg$' | sort); do
 		if [ -s "$trusted" ]; then
 		if [ -s "$trusted" ]; then
 		    $ACTION "$trusted" "$@"
 		    $ACTION "$trusted" "$@"
 		fi
 		fi

+ 1 - 1
test/integration/run-tests

@@ -83,7 +83,7 @@ PASS=0
 ALL=0
 ALL=0
 FAILED_TESTS=""
 FAILED_TESTS=""
 DIR="$(readlink -f "$(dirname "$0")")"
 DIR="$(readlink -f "$(dirname "$0")")"
-TESTLIST="$(run-parts --list "$DIR" --regex '^test-.*$')"
+TESTLIST="$(find "$DIR" -mindepth 1 -maxdepth 1 -regex '^.*/test-[^/]*$' | sort)"
 if [ -n "$APT_TEST_JOBS" ]; then
 if [ -n "$APT_TEST_JOBS" ]; then
 	if [ "$MSGCOLOR" != 'NO' ]; then
 	if [ "$MSGCOLOR" != 'NO' ]; then
 		export MSGCOLOR='ALWAYS'
 		export MSGCOLOR='ALWAYS'