pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap Use the install-sh wrapper to create directo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/05cf272ed7e8
branches:  trunk
changeset: 470737:05cf272ed7e8
user:      sketch <sketch%pkgsrc.org@localhost>
date:      Thu Mar 11 17:47:18 2004 +0000

description:
Use the install-sh wrapper to create directories rather than relying on
the system mkdir(1) which may bail out too easily for non-fatal errors.

Should fix pkg/23086

diffstat:

 bootstrap/bootstrap |  22 ++++++++++++++--------
 1 files changed, 14 insertions(+), 8 deletions(-)

diffs (65 lines):

diff -r d53f66a06d7b -r 05cf272ed7e8 bootstrap/bootstrap
--- a/bootstrap/bootstrap       Thu Mar 11 17:44:56 2004 +0000
+++ b/bootstrap/bootstrap       Thu Mar 11 17:47:18 2004 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.3 2004/03/11 17:29:11 tv Exp $
+# $NetBSD: bootstrap,v 1.4 2004/03/11 17:47:18 sketch Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -158,11 +158,18 @@
        fi
 }
 
+# Some versions of mkdir (notably SunOS) bail out too easily, so use the
+# install-sh wrapper instead.
+mkdir_p()
+{
+       run_cmd "($shprog ./files/install-sh -d -o $user -g $group -m 755 $@)"
+}
+
 copy_src()
 {
        _src="$1"; _dst="$2"
        if [ ! -d $wrkdir/$_dst ]; then
-               $mkdirprog -p $wrkdir/$_dst
+               mkdir_p $wrkdir/$_dst
        fi
        $cpprog -Rp $_src/* $wrkdir/$_dst
 }
@@ -320,7 +327,6 @@
 check_prog idprog id
 check_prog groupsprog groups
 check_prog lsprog ls
-check_prog mkdirprog mkdir
 check_prog rmdirprog rmdir
 check_prog sedprog sed
 check_prog shprog sh
@@ -370,7 +376,7 @@
        for fs in "$prefix" "$pkgsrcdir"; do
                testdir="pkgsrc-REQUIRES-case-SENSITIVE-filesystem"
                testdir_mangled="PKGSRC-requires-CASE-sensitive-FILESYSTEM"
-               $mkdirprog -p "$fs/$testdir" || die "can't verify filesystem ($fs) case-sensitivity"
+               mkdir_p "$fs/$testdir" || die "can't verify filesystem ($fs) case-sensitivity"
                if [ -d "$fs/$testdir_mangled" ]; then
                        $rmdirprog "$fs/$testdir"
                        die "\"$fs\" needs to be on a case-sensitive filesystem (see README.Darwin)"
@@ -411,12 +417,12 @@
 echo "LOCALBASE=$prefix" >> mk.conf.example
 
 # create directories
-run_cmd "$mkdirprog -p $prefix $pkgdbdir $prefix/sbin"
-run_cmd "$mkdirprog -p $prefix/man/man1 $prefix/man/cat1"
-run_cmd "$mkdirprog -p $prefix/man/man8 $prefix/man/cat8"
+mkdir_p $prefix $pkgdbdir $prefix/sbin
+mkdir_p $prefix/man/man1 $prefix/man/cat1
+mkdir_p $prefix/man/man8 $prefix/man/cat8
 
 # bootstrap make and *.mk files
-run_cmd "$mkdirprog -p $prefix/share/mk $prefix/lib"
+mkdir_p $prefix/share/mk $prefix/lib
 (cd bmake/mk;
        if [ -f ../../mods/mk/$opsys.sys.mk ]; then
                run_cmd "$cpprog ../../mods/mk/$opsys.sys.mk $prefix/share/mk/sys.mk"



Home | Main Index | Thread Index | Old Index