Skip to content

Commit

Permalink
ports-mgmt/poudriere: Fix typo in option name
Browse files Browse the repository at this point in the history
Approved by:	Fixit blanket
  • Loading branch information
madpilot78 committed Oct 11, 2023
1 parent 72b2480 commit f122949
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ports-mgmt/poudriere/Makefile
Expand Up @@ -20,7 +20,7 @@ GH_ACCOUNT= freebsd
GNU_CONFIGURE= yes
ETCDIR= ${PREFIX}/etc/poudriere.d

OPTIONS_DEFINE= BASH MANIFESTS PROTCONFIG EXAMPLES QEMU ZSH
OPTIONS_DEFINE= BASH MANIFESTS PORTCONFIG EXAMPLES QEMU ZSH
OPTIONS_DEFAULT=BASH MANIFESTS PORTCONFIG ZSH
OPTIONS_SUB= yes

Expand Down
@@ -0,0 +1,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}

0 comments on commit f122949

Please sign in to comment.