summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2012-07-26 13:00:48 +0000
committerjperkin <jperkin@pkgsrc.org>2012-07-26 13:00:48 +0000
commitd54c7004026484be6bb3177bf358b5acb0f785de (patch)
tree4ad6894b3674c5f0f9e79f64338f3e28fad166a0 /bootstrap
parentb390eb6824d0c0acbb8151b17e3885f2c7c744dd (diff)
downloadpkgsrc-d54c7004026484be6bb3177bf358b5acb0f785de.tar.gz
Add support for --prefer-pkgsrc which will set PREFER_PKGSRC in the bootstrap
and target mk.conf. Primarily useful to ensure pkgsrc zlib/bzip2 etc are used for pkg_install.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap/bootstrap13
1 files changed, 11 insertions, 2 deletions
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 03904ff843e..11459aca454 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.179 2012/07/24 13:18:00 jperkin Exp $
+# $NetBSD: bootstrap,v 1.180 2012/07/26 13:00:48 jperkin Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc@NetBSD.org>
# All rights reserved.
@@ -64,6 +64,7 @@ usage="Usage: $0 "'
[ --mk-fragment <mk.conf> ]
[ --pkgdbdir <pkgdbdir> ]
[ --pkgmandir <pkgmandir> ]
+ [ --prefer-pkgsrc <list|yes|no> ]
[ --prefix <prefix> ]
[ --preserve-path ]
[ --quiet ]
@@ -390,12 +391,15 @@ while [ $# -gt 0 ]; do
--abi=*) abi=`get_optarg "$1"` ;;
--abi) abi="$2"; shift ;;
--unprivileged | --ignore-user-check) unprivileged=yes ;;
+ --prefer-pkgsrc=*)
+ prefer_pkgsrc=`get_optarg "$1"` ;;
+ --prefer-pkgsrc)
+ prefer_pkgsrc="$2"; shift ;;
--preserve-path) preserve_path=yes ;;
--mk-fragment=*)
mk_fragment=`get_optarg "$1"` ;;
--mk-fragment)
mk_fragment="$2"; shift ;;
-
--binary-kit=*)
binary_kit=`get_optarg "$1"` ;;
--binary-kit)
@@ -898,6 +902,11 @@ echo "PKG_TOOLS_BIN= $prefix/sbin" >> ${TARGET_MKCONF}
echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF}
echo "" >> ${TARGET_MKCONF}
+if [ -n "$prefer_pkgsrc" ]; then
+ echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF}
+ echo "" >> ${TARGET_MKCONF}
+fi
+
BOOTSTRAP_MKCONF=${wrkdir}/mk.conf
cp ${TARGET_MKCONF} ${BOOTSTRAP_MKCONF}