Sun Oct 22 19:29:20 2017 UTC ()
Set cwrappers in bootstrap mk.conf too.

When bootstrap is run with --cwrappers=no (or yes, for that matter),
the value is written into mk.conf at the end of the bootstrap but not
used _during_ the bootstrap itself. Thus, when bootstrapping on Linux
with no builtin diffutils, cwrappers ends up indirectly depending on
itself, and there is no way around that. This commit fixes this.


(bsiegert)
diff -r1.243 -r1.244 pkgsrc/bootstrap/bootstrap

cvs diff -r1.243 -r1.244 pkgsrc/bootstrap/bootstrap (expand / switch to unified diff)

--- pkgsrc/bootstrap/bootstrap 2017/09/23 05:43:51 1.243
+++ pkgsrc/bootstrap/bootstrap 2017/10/22 19:29:20 1.244
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#! /bin/sh 1#! /bin/sh
2 2
3# $NetBSD: bootstrap,v 1.243 2017/09/23 05:43:51 maya Exp $ 3# $NetBSD: bootstrap,v 1.244 2017/10/22 19:29:20 bsiegert Exp $
4# 4#
5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org> 5# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
6# All rights reserved. 6# All rights reserved.
7# 7#
8# Redistribution and use in source and binary forms, with or without 8# Redistribution and use in source and binary forms, with or without
9# modification, are permitted provided that the following conditions 9# modification, are permitted provided that the following conditions
10# are met: 10# are met:
11# 1. Redistributions of source code must retain the above copyright 11# 1. Redistributions of source code must retain the above copyright
12# notice, this list of conditions and the following disclaimer. 12# notice, this list of conditions and the following disclaimer.
13# 2. Redistributions in binary form must reproduce the above copyright 13# 2. Redistributions in binary form must reproduce the above copyright
14# notice, this list of conditions and the following disclaimer in the 14# notice, this list of conditions and the following disclaimer in the
15# documentation and/or other materials provided with the distribution. 15# documentation and/or other materials provided with the distribution.
16# 16#
@@ -1080,26 +1080,27 @@ echo "PKGMANDIR= $pkgmandir" >> ${TARGE @@ -1080,26 +1080,27 @@ echo "PKGMANDIR= $pkgmandir" >> ${TARGE
1080echo "" >> ${TARGET_MKCONF} 1080echo "" >> ${TARGET_MKCONF}
1081 1081
1082if [ -n "$prefer_pkgsrc" ]; then 1082if [ -n "$prefer_pkgsrc" ]; then
1083 echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF} 1083 echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF}
1084 echo "" >> ${TARGET_MKCONF} 1084 echo "" >> ${TARGET_MKCONF}
1085fi 1085fi
1086 1086
1087BOOTSTRAP_MKCONF=${wrkdir}/mk.conf 1087BOOTSTRAP_MKCONF=${wrkdir}/mk.conf
1088cp ${TARGET_MKCONF} ${BOOTSTRAP_MKCONF} 1088cp ${TARGET_MKCONF} ${BOOTSTRAP_MKCONF}
1089 1089
1090case "$cwrappers" in 1090case "$cwrappers" in
1091yes|no) 1091yes|no)
1092 echo "USE_CWRAPPERS= $cwrappers" >> ${TARGET_MKCONF} 1092 echo "USE_CWRAPPERS= $cwrappers" >> ${TARGET_MKCONF}
 1093 echo "USE_CWRAPPERS= $cwrappers" >> ${BOOTSTRAP_MKCONF}
1093 echo "" >> ${TARGET_MKCONF} 1094 echo "" >> ${TARGET_MKCONF}
1094 ;; 1095 ;;
1095esac 1096esac
1096 1097
1097# On all Debian GNU/kFreeBSD 7, /bin/sh is a symlink to /bin/dash, and 1098# On all Debian GNU/kFreeBSD 7, /bin/sh is a symlink to /bin/dash, and
1098# use /bin/bash. 1099# use /bin/bash.
1099if [ "$opsys" = "GNUkFreeBSD" -a "$bootstrap_sh_set" != "set" ]; then 1100if [ "$opsys" = "GNUkFreeBSD" -a "$bootstrap_sh_set" != "set" ]; then
1100 echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${TARGET_MKCONF} 1101 echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${TARGET_MKCONF}
1101 echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${BOOTSTRAP_MKCONF} 1102 echo "TOOLS_PLATFORM.sh?= /bin/bash # instead of /bin/sh" >> ${BOOTSTRAP_MKCONF}
1102 echo $opsys 1103 echo $opsys
1103fi 1104fi
1104 1105
1105# sbin is used by pkg_install, share/mk by bootstrap-mk-files 1106# sbin is used by pkg_install, share/mk by bootstrap-mk-files