blob: 335e4fb43e166af46135f6369543afeb39e39f95 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
From 628d150d645d34deeab7882d7056c8f7c868159d Mon Sep 17 00:00:00 2001
From: Baptiste Daroussin <bapt@FreeBSD.org>
Date: Wed, 11 Oct 2023 08:52:08 +0200
Subject: [PATCH] options: support both dialog4ports and portconfig
---
src/share/poudriere/options.sh | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/share/poudriere/options.sh b/src/share/poudriere/options.sh
index 745c20d80..51a9aff97 100755
--- src/share/poudriere/options.sh
+++ src/share/poudriere/options.sh
@@ -155,7 +155,13 @@ fi
export PORTSDIR=`pget ${PTNAME} mnt`
[ -d "${PORTSDIR}/ports" ] && PORTSDIR="${PORTSDIR}/ports"
[ -z "${PORTSDIR}" ] && err 1 "No such ports tree: ${PTNAME}"
-command -v dialog4ports >/dev/null 2>&1 || err 1 "You must have ports-mgmt/dialog4ports installed on the host to use this command."
+if command -v portconfig >/dev/null 2>&1; then
+ d4p=portconfig
+elif command -v dialog4ports >/dev/null 2>&1; then
+ d4p=dialog4ports
+else
+ err 1 "You must have ports-mgmt/dialog4ports or ports-mgmt/portconfig installed on the host to use this command."
+fi
read_packages_from_params "$@"
@@ -205,7 +211,7 @@ for originspec in $(listed_ports show_moved); do
env ${flavor:+FLAVOR=${flavor}} \
make PORT_DBDIR=${PORT_DBDIR} \
PKG_BIN=`which pkg-static` \
- DIALOG4PORTS=`which dialog4ports` \
+ DIALOG4PORTS=`which $d4p` \
LOCALBASE=/nonexistent \
-C ${PORTSDIR}/${origin} \
${RECURSE_COMMAND}
|