pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk mk: Revert userland version detection for OS_VERSIO...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0bb8cf52e8ac
branches:  trunk
changeset: 382814:0bb8cf52e8ac
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat Aug 06 07:38:44 2022 +0000

description:
mk: Revert userland version detection for OS_VERSION for NetBSD, causes
unintended consequences when an older userland is bootstrapped, and
incompatibility with osabi. Separate variable for userland version
for NetBSD is likely the way forward.

diffstat:

 mk/bsd.prefs.mk |  12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)

diffs (36 lines):

diff -r d6fd9f711507 -r 0bb8cf52e8ac mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Sat Aug 06 07:22:32 2022 +0000
+++ b/mk/bsd.prefs.mk   Sat Aug 06 07:38:44 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.425 2022/08/01 07:58:21 wiz Exp $
+# $NetBSD: bsd.prefs.mk,v 1.426 2022/08/06 07:38:44 nia Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -101,11 +101,7 @@
 # without executing the commands at all.  Later, recursed make
 # invocations will skip these blocks entirely thanks to MAKEFLAGS.
 .if !defined(OS_VERSION)
-.  if ${OPSYS} == "NetBSD" && exists(/etc/release)
-_OS_VERSION_CMD=       head -1 /etc/release | sed -e "s,^NetBSD ,,g" -e "s,/.*$,,g"
-.  else
 _OS_VERSION_CMD=       ${UNAME} -r
-.  endif
 OS_VERSION=            ${_OS_VERSION_CMD:sh}
 MAKEFLAGS+=            OS_VERSION=${OS_VERSION:Q}
 .endif
@@ -117,14 +113,8 @@
 # it to a custom command in the later OPSYS-specific section.
 #
 .if !defined(OPSYS_VERSION)
-.  if ${OPSYS} == "NetBSD" && exists(/etc/release)
-_OPSYS_VERSION_CMD=    head -1 /etc/release | \
-                       sed -e "s,^NetBSD ,,g" | \
-                       awk -F. '{major=int($$1); minor=int($$2); if (minor>=100) minor=99; patch=int($$3); if (patch>=100) patch=99; printf "%02d%02d%02d", major, minor, patch}'
-.  else
 _OPSYS_VERSION_CMD=    ${UNAME} -r | \
                        awk -F. '{major=int($$1); minor=int($$2); if (minor>=100) minor=99; patch=int($$3); if (patch>=100) patch=99; printf "%02d%02d%02d", major, minor, patch}'
-.  endif
 OPSYS_VERSION=         ${_OPSYS_VERSION_CMD:sh}
 MAKEFLAGS+=            OPSYS_VERSION=${OPSYS_VERSION:Q}
 .endif



Home | Main Index | Thread Index | Old Index