pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap Use pkgsrc awk on ChromeOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3040393965e4
branches:  trunk
changeset: 375067:3040393965e4
user:      bsiegert <bsiegert%pkgsrc.org@localhost>
date:      Fri Feb 02 15:53:44 2018 +0000

description:
Use pkgsrc awk on ChromeOS.

Since Chrome 64, /usr/bin/awk has been a version of mawk that is permanently
in restricted mode. Notably, this means it cannot run pipes, which pkgsrc
requires. Use nawk.

diffstat:

 bootstrap/bootstrap |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 2853f0a975d0 -r 3040393965e4 bootstrap/bootstrap
--- a/bootstrap/bootstrap       Fri Feb 02 15:41:03 2018 +0000
+++ b/bootstrap/bootstrap       Fri Feb 02 15:53:44 2018 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.245 2017/12/09 00:33:36 sevan Exp $
+# $NetBSD: bootstrap,v 1.246 2018/02/02 15:53:44 bsiegert Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -707,10 +707,13 @@
                root_group=root
        fi
        need_bsd_install=no
+       CHROMEOS_RELEASE_NAME!= awk -F = '$$1 == "CHROMEOS_RELEASE_NAME" { print $$2 }' /etc/lsb-release
        # Debian/Ubuntu's awk is mawk, and mawk does not understand
        # some regexp used in pkgsrc/mk.
        if [ -f /etc/debian_version ]; then
                need_awk=yes
+       elif grep -sq '^CHROMEOS_RELEASE_NAME' /etc/lsb-release; then
+               need_awk=yes
        else
                need_awk=no
        fi



Home | Main Index | Thread Index | Old Index