pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap Add --mk-fragment option to bootstrap. This ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0cdfea0021ed
branches:  trunk
changeset: 531401:0cdfea0021ed
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Jul 29 17:09:47 2007 +0000

description:
Add --mk-fragment option to bootstrap. This allows including a fragment
after the automatic options and makes it simpler to rebuild the bootstrap
automatically from pbulk.

diffstat:

 bootstrap/bootstrap   |  12 +++++++++++-
 bootstrap/mkbinarykit |  10 ++++++++--
 2 files changed, 19 insertions(+), 3 deletions(-)

diffs (96 lines):

diff -r 1a9d64b57dbd -r 0cdfea0021ed bootstrap/bootstrap
--- a/bootstrap/bootstrap       Sun Jul 29 16:39:43 2007 +0000
+++ b/bootstrap/bootstrap       Sun Jul 29 17:09:47 2007 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.101 2007/07/27 10:43:24 joerg Exp $
+# $NetBSD: bootstrap,v 1.102 2007/07/29 17:09:47 joerg Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -70,6 +70,7 @@
     [ --unprivileged | --ignore-user-check ]
     [ --preserve-path ]
     [ --compiler <compiler> ]
+    [ --mk-fragment <mk.conf> ]
     [ --full ]
     [ --quiet ]
     [ --help ]'
@@ -275,6 +276,7 @@
 full=no
 compiler=""
 quiet=no
+mk_fragment=
 
 while [ $# -gt 0 ]; do
        case $1 in
@@ -297,6 +299,10 @@
        --ignore-case-check) ignorecasecheck=yes ;;
        --unprivileged | --ignore-user-check) ignoreusercheck=yes ;;
        --preserve-path) preserve_path=yes ;;
+       --mk-fragment=*)
+                       mk_fragment=`get_optarg "$1"` ;;
+       --mk-fragment)
+                       mk_fragment="$2"; shift ;;
        --full)         full=yes ;;
        --quiet)        quiet=yes ;;
        --help)         echo "$usage"; exit ;;
@@ -889,6 +895,10 @@
 
 echo "" >> ${TARGET_MKCONF}
 echo "" >> ${BOOTSTRAP_MKCONF}
+if test -n "${mk_fragment}"; then
+       cat "${mk_fragment}" >> ${TARGET_MKCONF}
+       echo "" >> ${TARGET_MKCONF}
+fi
 echo ".endif                   # end pkgsrc settings" >> ${TARGET_MKCONF}
 echo ".endif                   # end pkgsrc settings" >> ${BOOTSTRAP_MKCONF}
 
diff -r 1a9d64b57dbd -r 0cdfea0021ed bootstrap/mkbinarykit
--- a/bootstrap/mkbinarykit     Sun Jul 29 16:39:43 2007 +0000
+++ b/bootstrap/mkbinarykit     Sun Jul 29 17:09:47 2007 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# $NetBSD: mkbinarykit,v 1.23 2007/05/27 19:55:58 schmonz Exp $
+# $NetBSD: mkbinarykit,v 1.24 2007/07/29 17:09:52 joerg Exp $
 #
 # Make a binary bootstrap kit and place it in targetdir (or current
 # working directory if not specified). The mk.conf.example file is
@@ -52,7 +52,7 @@
 usage="Usage: $0 "'
        [ --force ] [ --targetdir=<tar target dir> ] [ --mkconf=<target> ]
        [ --no-build ] [ --workdir=<work dir> ] [ bootstrap script arguments ]
-       [ --fetch-cmd=<ftp command> ]'
+       [ --fetch-cmd=<ftp command> ] [ --mk-fragment=<mk.conf> ]'
 
 opsys=`uname -s | tr -d /-`
 osrev=`uname -r`
@@ -63,6 +63,7 @@
 sysconfdir=$prefix/etc
 pkgdbdir=/var/db/pkg
 mkfile=
+mk_fragment=
 ignorecasecheck=no
 ignoreusercheck=no
 force=no
@@ -133,6 +134,8 @@
        --prefix=*)     prefix=`echo $1 | $sedprog -e 's|--prefix=||'` ;;
        --fetch-cmd=*)  fetch_cmd="$1" ;;
        --mkconf=*)     mkfile=`echo $1 | $sedprog -e 's|--mkconf=||'` ;;
+       --mk-fragment=*)
+                       mk_fragment="$1" ;;
        --pkgdbdir=*)   pkgdbdir=`echo $1 | $sedprog -e 's|--pkgdbdir=||'` ;;
        --ignore-case-check) ignorecasecheck=yes ;;
        --ignore-user-check) ignoreusercheck=yes ;;
@@ -163,6 +166,9 @@
        if [ "$ignorecasecheck" = "yes" ]; then
        bootstrap_flags="$bootstrap_flags --ignore-case-check"
        fi
+       if [ -n "${mk_fragment}" ]; then
+       bootstrap_flags="$bootstrap_flags ${mk_fragment}"
+       fi
 
        if [ "$ignoreusercheck" = "yes" ]; then
        bootstrap_flags="$bootstrap_flags --ignore-user-check"



Home | Main Index | Thread Index | Old Index