Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ports-mgmt/poudriere: Fix typo in option name
Approved by: Fixit blanket
- Loading branch information
1 parent
72b2480
commit f122949
Showing
2 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
ports-mgmt/poudriere/files/patch-628d150d645d34deeab7882d7056c8f7c868159d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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} |