mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Makefile.inc1: Avoid hanging if pkg is not installed
For `pkg --version`, Redirect stdin from /dev/null to avoid waiting on
/usr/sbin/pkg's bootstrap prompt if the pkg package is not installed.
Also redirect stderr to /dev/null to discard the warning message in
this case.
Reported by: mjg
Fixes: 4e224e4be7 ("pkgbase: accommodate pkg < 1.17")
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
1f88aa0941
commit
54247ce1f9
1 changed files with 2 additions and 1 deletions
|
|
@ -1889,7 +1889,8 @@ _pkgbootstrap: .PHONY
|
|||
.if make(create-world-packages-jobs) || make(create-kernel-packages*) || make(real-update-packages) || make(sign-packages)
|
||||
PKG_ABI!=${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname config ABI
|
||||
.endif
|
||||
PKG_BIN_VERSION!=${PKG_CMD} --version | awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
|
||||
PKG_BIN_VERSION!=${PKG_CMD} --version </dev/null 2>/dev/null |\
|
||||
awk -F. '/^[0-9.]+$$/ {print $$1 * 10000 + $$2 * 100 + $$3}'
|
||||
.if ${PKG_BIN_VERSION} < 11700
|
||||
PKG_EXT= ${PKG_FORMAT}
|
||||
.else
|
||||
|
|
|
|||
Loading…
Reference in a new issue