pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/depgraph



Module Name:    pkgsrc
Committed By:   agc
Date:           Tue Mar 24 18:10:07 UTC 2026

Modified Files:
        pkgsrc/pkgtools/depgraph: Makefile
        pkgsrc/pkgtools/depgraph/files: 3.expected 4.expected 5.expected
            6.expected 7.expected depgraph.sh test.sh
Added Files:
        pkgsrc/pkgtools/depgraph/files: 8.expected

Log Message:
pkgtools/depgraph: update to 20260320 - fail gracefully when the package name is
not recognised

fix some pkglint in the Makefile - thanks to rillig for the advice


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/depgraph/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/pkgtools/depgraph/files/3.expected \
    pkgsrc/pkgtools/depgraph/files/4.expected \
    pkgsrc/pkgtools/depgraph/files/5.expected \
    pkgsrc/pkgtools/depgraph/files/6.expected \
    pkgsrc/pkgtools/depgraph/files/7.expected \
    pkgsrc/pkgtools/depgraph/files/test.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/pkgtools/depgraph/files/8.expected
cvs rdiff -u -r1.3 -r1.4 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/Makefile
diff -u pkgsrc/pkgtools/depgraph/Makefile:1.1 pkgsrc/pkgtools/depgraph/Makefile:1.2
--- pkgsrc/pkgtools/depgraph/Makefile:1.1       Wed Mar 11 21:54:30 2026
+++ pkgsrc/pkgtools/depgraph/Makefile   Tue Mar 24 18:10:06 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2026/03/11 21:54:30 agc Exp $
+# $NetBSD: Makefile,v 1.2 2026/03/24 18:10:06 agc Exp $
 
 DISTNAME=              depgraph-${VERSION}
 CATEGORIES=            pkgtools
@@ -17,7 +17,8 @@ INSTALL_MAKE_FLAGS+=  PREFIX=${DESTDIR}${
 
 .include "../../mk/bsd.prefs.mk"
 
-VERSION!=      ${AWK} -F= '/^DEPGRAPH_VERSION=/ {print $$2}' ${FILESDIR}/depgraph.sh
+GRAB_VERSION=  ${AWK} -F= '/^DEPGRAPH_VERSION=/ {print $$2}' ${FILESDIR}/depgraph.sh
+VERSION=       ${GRAB_VERSION:sh}
 
 do-extract:
        ${CP} -R ${FILESDIR} ${WRKSRC}

Index: pkgsrc/pkgtools/depgraph/files/3.expected
diff -u pkgsrc/pkgtools/depgraph/files/3.expected:1.1 pkgsrc/pkgtools/depgraph/files/3.expected:1.2
--- pkgsrc/pkgtools/depgraph/files/3.expected:1.1       Wed Mar 11 21:54:30 2026
+++ pkgsrc/pkgtools/depgraph/files/3.expected   Tue Mar 24 18:10:06 2026
@@ -106,3 +106,4 @@ port2pkg
 |--perl
 |--pkglint
 neatvi
+depgraph
Index: pkgsrc/pkgtools/depgraph/files/4.expected
diff -u pkgsrc/pkgtools/depgraph/files/4.expected:1.1 pkgsrc/pkgtools/depgraph/files/4.expected:1.2
--- pkgsrc/pkgtools/depgraph/files/4.expected:1.1       Wed Mar 11 21:54:30 2026
+++ pkgsrc/pkgtools/depgraph/files/4.expected   Tue Mar 24 18:10:06 2026
@@ -106,3 +106,4 @@ port2pkg-1.15nb9
 |--perl-5.42.0nb1
 |--pkglint-23.20.0
 neatvi-09
+depgraph-20260320
Index: pkgsrc/pkgtools/depgraph/files/5.expected
diff -u pkgsrc/pkgtools/depgraph/files/5.expected:1.1 pkgsrc/pkgtools/depgraph/files/5.expected:1.2
--- pkgsrc/pkgtools/depgraph/files/5.expected:1.1       Wed Mar 11 21:54:30 2026
+++ pkgsrc/pkgtools/depgraph/files/5.expected   Tue Mar 24 18:10:06 2026
@@ -106,3 +106,4 @@ port2pkg-1.15nb9 ()
 |--perl-5.42.0nb1 (gnu-gpl-v2 OR artistic)
 |--pkglint-23.20.0 (2-clause-bsd)
 neatvi-09 (isc)
+depgraph-20260320 (modified-bsd)
Index: pkgsrc/pkgtools/depgraph/files/6.expected
diff -u pkgsrc/pkgtools/depgraph/files/6.expected:1.1 pkgsrc/pkgtools/depgraph/files/6.expected:1.2
--- pkgsrc/pkgtools/depgraph/files/6.expected:1.1       Wed Mar 11 21:54:30 2026
+++ pkgsrc/pkgtools/depgraph/files/6.expected   Tue Mar 24 18:10:06 2026
@@ -106,3 +106,4 @@ port2pkg ()
 |--perl (gnu-gpl-v2 OR artistic)
 |--pkglint (2-clause-bsd)
 neatvi (isc)
+depgraph (modified-bsd)
Index: pkgsrc/pkgtools/depgraph/files/7.expected
diff -u pkgsrc/pkgtools/depgraph/files/7.expected:1.1 pkgsrc/pkgtools/depgraph/files/7.expected:1.2
--- pkgsrc/pkgtools/depgraph/files/7.expected:1.1       Wed Mar 11 21:54:30 2026
+++ pkgsrc/pkgtools/depgraph/files/7.expected   Tue Mar 24 18:10:06 2026
@@ -430,3 +430,7 @@
   "package": "neatvi-09",
   "license": "isc"
 }
+{
+  "package": "depgraph-20260320",
+  "license": "modified-bsd"
+}
Index: pkgsrc/pkgtools/depgraph/files/test.sh
diff -u pkgsrc/pkgtools/depgraph/files/test.sh:1.1 pkgsrc/pkgtools/depgraph/files/test.sh:1.2
--- pkgsrc/pkgtools/depgraph/files/test.sh:1.1  Wed Mar 11 21:54:31 2026
+++ pkgsrc/pkgtools/depgraph/files/test.sh      Tue Mar 24 18:10:06 2026
@@ -38,3 +38,8 @@ echo "7. license, version numbers and js
 ./depgraph.sh -l -v -j | jq . > 7.out
 diff 7.expected 7.out
 rm -f 7.out
+
+echo "8. package that's not installed"
+./depgraph.sh clung EMACS not-there > 8.out
+diff 8.expected 8.out
+rm -f 8.out

Index: pkgsrc/pkgtools/depgraph/files/depgraph.sh
diff -u pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.3 pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.4
--- pkgsrc/pkgtools/depgraph/files/depgraph.sh:1.3      Thu Mar 19 18:31:39 2026
+++ pkgsrc/pkgtools/depgraph/files/depgraph.sh  Tue Mar 24 18:10:06 2026
@@ -25,7 +25,7 @@
 #
 # Usage: depgraph [-V] [-v] [pkg...]
 
-DEPGRAPH_VERSION=20260319
+DEPGRAPH_VERSION=20260320
 
 case "$(uname -s)" in
 NetBSD)
@@ -100,6 +100,12 @@ dopkg() {
        local str="$2"
        local prereq=0
 
+       installed_name="$(${pkg_info} -e ${name})"
+       case "${installed_name}" in
+       "")     printf "depgraph: %s: not installed\n" "${name}"
+               return 1
+               ;;
+       esac
        case "${name}" in
        "")     ;;
        *)
@@ -116,7 +122,7 @@ dopkg() {
                        lic=""
                fi
                if ${nameversion}; then
-                       s=$(${pkg_info} -e "${name}")
+                       s="${installed_name}"
                else
                        s="${name}"
                fi

Added files:

Index: pkgsrc/pkgtools/depgraph/files/8.expected
diff -u /dev/null pkgsrc/pkgtools/depgraph/files/8.expected:1.1
--- /dev/null   Tue Mar 24 18:10:07 2026
+++ pkgsrc/pkgtools/depgraph/files/8.expected   Tue Mar 24 18:10:06 2026
@@ -0,0 +1,3 @@
+depgraph: clung: not installed
+depgraph: EMACS: not installed
+depgraph: not-there: not installed



Home | Main Index | Thread Index | Old Index