pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap Test for existing $prefix and $pkgdbdir and ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c93510975ee6
branches:  trunk
changeset: 357001:c93510975ee6
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Tue Jan 10 12:30:00 2017 +0000

description:
Test for existing $prefix and $pkgdbdir and bail out early if they exist,
rather than failing with exotic errors later.

diffstat:

 bootstrap/bootstrap |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r 2d7db6be6d96 -r c93510975ee6 bootstrap/bootstrap
--- a/bootstrap/bootstrap       Tue Jan 10 12:16:08 2017 +0000
+++ b/bootstrap/bootstrap       Tue Jan 10 12:30:00 2017 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.236 2017/01/10 12:16:08 jperkin Exp $
+# $NetBSD: bootstrap,v 1.237 2017/01/10 12:30:00 jperkin Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -933,6 +933,14 @@
        die "\"${wrkdir}\" already exists, please remove it or use --workdir"
 fi
 
+if [ -f "${prefix}/share/mk/sys.mk" ]; then
+       die "\"${prefix}\" already in use, remove it or use a different --prefix"
+fi
+
+if [ -d "${pkgdbdir}/bootstrap-mk-files-"* ]; then
+       die "\"${pkgdbdir}\" already in use, remove it or use a different --pkgdbdir"
+fi
+
 mkdir_p_early ${wrkdir}
 if touch ${wrkdir}/.writeable; then
        :



Home | Main Index | Thread Index | Old Index