Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jun 2026 08:15:46 +0000
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 81e1ec7b3320 - main - ools/scripts: remove support for legacy pkg tools
Message-ID:  <6a2e6332.27784.9e5eb70@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by bapt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=81e1ec7b3320967804c0541b47c3ebccda5c0bf9

commit 81e1ec7b3320967804c0541b47c3ebccda5c0bf9
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2026-06-14 08:15:24 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2026-06-14 08:15:41 +0000

    ools/scripts: remove support for legacy pkg tools
---
 Tools/scripts/BDB-upgrade-helper.sh | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/Tools/scripts/BDB-upgrade-helper.sh b/Tools/scripts/BDB-upgrade-helper.sh
index 0e44d2632138..db0e6deddb09 100755
--- a/Tools/scripts/BDB-upgrade-helper.sh
+++ b/Tools/scripts/BDB-upgrade-helper.sh
@@ -24,26 +24,15 @@ fi
 
 # check BerkeleyDB 4.0...4.7 versions
 rx='db4[1-7]?(-nocrypto)?-4'
-if pkg -N 2>/dev/null ; then pkg=yes ; else pkg= ; fi
-if [ -n "$pkg" ] ; then
-    # pkg
-    dbnames=$(pkg info -x "$rx")
-else
-    # old pkg_*
-    dbnames=$(pkg_info -E -X "$rx")
-fi
+dbnames=$(pkg info -x "$rx")
 
 # due to set -e, the script will not reach this point
 # unless there have been matched packages - without packages,
-# pkg_info or pkg will exit with failure.
+# pkg will exit with failure.
 
 # check if we need to pass in origins or package names
 if [ "$tool" = portupgrade ] ; then
-    if [ -n "$pkg" ] ; then
-	dbnames=$(printf '%s\n' "$dbnames" | xargs -n1 pkg info -q -o)
-    else
-	dbnames=$(printf '%s\n' "$dbnames" | xargs -n1 pkg_info -q -o)
-    fi
+    dbnames=$(printf '%s\n' "$dbnames" | xargs -n1 pkg info -q -o)
 fi
 
 # generate the upgrade command
@@ -68,10 +57,6 @@ $cmd
 # due to set -e, the script will not reach this point
 # if there was an error or failure with the upgrade tool
 
-if [ -n "$pkg" ] ; then
-    pkg delete $dbnames
-else
-    pkg_delete $dbnames
-fi
+pkg delete $dbnames
 
 echo "Success."


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a2e6332.27784.9e5eb70>