]> git.ipfire.org Git - pakfire.git/commitdiff
build: Fix collecting pre-requires from scriptlets
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Nov 2022 16:39:20 +0000 (16:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 29 Nov 2022 16:39:20 +0000 (16:39 +0000)
--login is required to set the path correctly, and we now throw away any
errors from which.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/scripts/find-prerequires

index 355aa612b4c577c999023f565c8525e0afce0856..be7d46730d4162ed6b00bceb99b7071cd3fcf8f6 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash --login
 ###############################################################################
 #                                                                             #
 # Pakfire - The IPFire package management system                              #
@@ -31,8 +31,6 @@ main() {
                return 1
        fi
 
-       cat "${scriptlet}" >&2
-
        # We require a shell
        echo "/bin/sh"
 
@@ -43,7 +41,7 @@ main() {
                                echo "${req}"
                                ;;
                        *)
-                               which "${req}"
+                               which "${req}" 2>/dev/null
                                ;;
                esac
        done < <(bash --rpm-requires < "${scriptlet}" | sed -e "s/^.*(//;s/)$//" | sort -u)