pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/pkgformat/pkg
Module Name: pkgsrc
Committed By: jperkin
Date: Fri Oct 4 07:39:02 UTC 2024
Modified Files:
pkgsrc/mk/pkgformat/pkg: resolve-dependencies
Log Message:
mk: Minor improvements to resolve-dependencies.
* Remove useless use of cat.
* Remove pointless renaming of _DEPENDS_FILE
* Exclude unsupported depends types earlier in the loop.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 pkgsrc/mk/pkgformat/pkg/resolve-dependencies
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/mk/pkgformat/pkg/resolve-dependencies
diff -u pkgsrc/mk/pkgformat/pkg/resolve-dependencies:1.3 pkgsrc/mk/pkgformat/pkg/resolve-dependencies:1.4
--- pkgsrc/mk/pkgformat/pkg/resolve-dependencies:1.3 Sat Jan 13 12:48:57 2018
+++ pkgsrc/mk/pkgformat/pkg/resolve-dependencies Fri Oct 4 07:39:01 2024
@@ -9,22 +9,18 @@
# resolve-dependencies
#
# DESCRIPTION
-# resolve-dependencies checks all entries in ${DEPENDS_FILE}
+# resolve-dependencies checks all entries in ${_DEPENDS_FILE}
# for existance. The best matching pattern is printed similiar
# to list-dependencies
#
######################################################################
-: ${CAT:=cat}
: ${ECHO:=echo}
: ${TEST:=test}
: ${TRUE:=true}
set -e
-DEPENDS_FILE=${_DEPENDS_FILE}
-unset _DEPENDS_FILE
-
error_msg() {
${ECHO} "ERROR:" "$*" 1>&2
}
@@ -38,9 +34,9 @@ find_best() {
esac
}
-${CAT} ${DEPENDS_FILE} | while read type pattern dir; do
- pkg=`find_best "$type" "$pattern"`
+while read type pattern dir; do
[ "$type" != test ] || continue
+ pkg=`find_best "$type" "$pattern"`
case "$pkg" in
"")
error_msg "[resolve-dependencies] A package matching \`\`$pattern'' should"
@@ -52,4 +48,4 @@ ${CAT} ${DEPENDS_FILE} | while read type
${ECHO} "$type $pattern $pkg"
;;
esac
-done
+done < ${_DEPENDS_FILE}
Home |
Main Index |
Thread Index |
Old Index