Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2021 16:02:30 -0400
From:      Ed Maste <emaste@freebsd.org>
To:        Iain Michael Butler <imb@protected-networks.net>
Cc:        Warner Losh <imp@bsdimp.com>, freebsd-current <freebsd-current@freebsd.org>
Subject:   Re: awk behaviour?
Message-ID:  <CAPyFy2AhJuL7d4rCp2-np7Vt95-RqYD0Ot2bx06EQ_czcoV7Rg@mail.gmail.com>
In-Reply-To: <04456969-bee0-8b22-4e81-a3201824d852@protected-networks.net>
References:  <8e1a8e3c-b062-7749-ceab-e500c1ab758e@protected-networks.net> <CANCZdfp1nTx0%2B4ZKWYOPN9WtBzDPHYRnzLL58=Ni7giwFQFmfw@mail.gmail.com> <04456969-bee0-8b22-4e81-a3201824d852@protected-networks.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 28 Jul 2021 at 15:15, Michael Butler via freebsd-current
<freebsd-current@freebsd.org> wrote:
>
> What prompted the question was my (obviously poor) attempt to debug and
> resolve this failure when attempting to build a release for i386 on an
> amd64 ..

This will be due to my 4e224e4be7c3. I'm not sure exactly what's
happening yet, but I can provoke this behaviour if `${PKG_CMD}
--version` outputs something other than a single line with the version
number.

Can you give this change a try:

diff --git a/Makefile.inc1 b/Makefile.inc1
index 23fb4b5581ac..9ef954e0678c 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1860,7 +1860,7 @@ _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. '{print $$1 * 10000 +
$$2 * 100 + $$3}'
+PKG_BIN_VERSION!=${PKG_CMD} --version | awk -F. '/^[0-9.]+$$/ {print
$$1 * 10000 + $$2 * 100 + $$3}'
 .if ${PKG_BIN_VERSION} < 11700
 PKG_EXT=       ${PKG_FORMAT}
 .else



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2AhJuL7d4rCp2-np7Vt95-RqYD0Ot2bx06EQ_czcoV7Rg>