Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/bootstrap bootstrap: Default to PREFER_PKGSRC=yes on L...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e89626c426f6
branches: trunk
changeset: 437302:e89626c426f6
user: bacon <bacon%pkgsrc.org@localhost>
date: Thu Aug 20 13:04:01 2020 +0000
description:
bootstrap: Default to PREFER_PKGSRC=yes on Linux
Avoids problems caused by linking against aging enterprise Linux libraries or
libraries from Linux package managers that undergo ABI changes outside pkgsrc
control.
Add --prefer-native flag to bootstrap script so all PREFER_* values can be
set during bootstrap. This resolves issues where bootstrap links packages
against native libraries and pkgsrc equivalents are installed afterward due
to changes to PREFER_NATIVE after bootstrap.
Automatically document danger of changing PREFER_PKGSRC or PREFER_NATIVE after
boostrap in mk.conf
diffstat:
bootstrap/bootstrap | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diffs (60 lines):
diff -r 49c541294a17 -r e89626c426f6 bootstrap/bootstrap
--- a/bootstrap/bootstrap Thu Aug 20 12:58:35 2020 +0000
+++ b/bootstrap/bootstrap Thu Aug 20 13:04:01 2020 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: bootstrap,v 1.291 2020/08/14 08:45:30 jperkin Exp $
+# $NetBSD: bootstrap,v 1.292 2020/08/20 13:04:01 bacon Exp $
#
# Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
# All rights reserved.
@@ -70,6 +70,7 @@
[ --pkginfodir <pkginfodir> ]
[ --pkgmandir <pkgmandir> ]
[ --prefer-pkgsrc <list|yes|no> ]
+ [ --prefer-native <list|yes|no> ]
[ --prefix <prefix> ]
[ --preserve-path ]
[ --quiet ]
@@ -448,6 +449,10 @@
prefer_pkgsrc=`get_optarg "$1"` ;;
--prefer-pkgsrc)
prefer_pkgsrc="$2"; shift ;;
+ --prefer-native=*)
+ prefer_native=`get_optarg "$1"` ;;
+ --prefer-native)
+ prefer_native="$2"; shift ;;
--preserve-path) preserve_path=yes ;;
--mk-fragment=*)
mk_fragment=`get_optarg "$1"` ;;
@@ -1064,10 +1069,29 @@
echo "PKGMANDIR= $pkgmandir" >> ${TARGET_MKCONF}
echo "" >> ${TARGET_MKCONF}
+case $opsys in
+Linux)
+ # Default to PREFER_PKGSRC=yes unless user specifies --prefer-native=yes
+ # Linux systems likely have software from other packages managers
+ # like yum or apt that can leak into pkgsrc and cause issues as they
+ # age, undergo ABI changes, or get added/removed behind our backs.
+ # Let pkgsrc maintain all dependencies to avoid these problems.
+ if [ -z "$prefer_pkgsrc" ] && [ "$prefer_native" != "yes" ]; then
+ prefer_pkgsrc="yes"
+ fi
+ ;;
+esac
+
if [ -n "$prefer_pkgsrc" ]; then
+ echo "# WARNING: Changing PREFER_* after bootstrap will require rebuilding all" >> ${TARGET_MKCONF}
+ echo "# packages with a dependency that switched between native/pkgsrc." >> ${TARGET_MKCONF}
echo "PREFER_PKGSRC= $prefer_pkgsrc" >> ${TARGET_MKCONF}
echo "" >> ${TARGET_MKCONF}
fi
+if [ -n "$prefer_native" ]; then
+ echo "PREFER_NATIVE= $prefer_native" >> ${TARGET_MKCONF}
+ echo "" >> ${TARGET_MKCONF}
+fi
BOOTSTRAP_MKCONF=${wrkdir}/mk.conf
cp ${TARGET_MKCONF} ${BOOTSTRAP_MKCONF}
Home |
Main Index |
Thread Index |
Old Index