pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/depgraph/files



Module Name:    pkgsrc
Committed By:   agc
Date:           Thu Mar 19 18:31:39 UTC 2026

Modified Files:
        pkgsrc/pkgtools/depgraph/files: depgraph.sh

Log Message:
pkgsrc/pkgtools/depgraph: update depgraph to 20260319 to fix a portability
bug in the shell function finding paths for executables. No more confusing
messages on Mac/Darwin now.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/pkgtools/depgraph/files/depgraph.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/depgraph/files/depgraph.sh
diff -u pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.2 pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.3
--- pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.2      Fri Mar 13 02:59:31 2026
+++ pkgsrc/pkgtools/depgraph/files/depgraph.sh  Thu Mar 19 18:31:39 2026
@@ -25,7 +25,7 @@
 #
 # Usage: depgraph [-V] [-v] [pkg...]
 
-DEPGRAPH_VERSION=20260312
+DEPGRAPH_VERSION=20260319
 
 case "$(uname -s)" in
 NetBSD)
@@ -40,32 +40,28 @@ license=false
 nameversion=false
 metadata=false
 
-# short script to look for an executable $2, and if found, to place
-# path in $1
+# find the path for the program/utility $2
+# set $1 with that information
 # taken from pkgsrc bootstrap
 which_prog()
 {
-       local IFS _var _name _d -
-       set -f
-
        _var="$1"; _name="$2"
 
-       eval _d=\"\$$_var\"
-       if [ -n "$_d" ]; then
+       eval _tmp=\"\$$_var\"
+       if [ "x$_tmp" != "x" ]; then
                # Variable is already set (by the user, for example)
                return 0
        fi
 
-       IFS=:
-       for _d in $PATH ; do
+       for _d in `echo $PATH | tr ':' ' '`; do
                if [ -f "$_d/$_name" ] && [ -x "$_d/$_name" ]; then
                        # Program found
                        eval $_var=\""$_d/$_name"\"
-                       return 0
+                       return 1
                fi
        done
 
-       return 1
+       die "$_name not found in path."
 }
 
 # get the correct programs



Home | Main Index | Thread Index | Old Index