Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/pkgviews]: src/usr.sbin/pkg_install/view Don't allow the stowdir and the...
details: https://anonhg.NetBSD.org/src/rev/e6a42736a921
branches: pkgviews
changeset: 534276:e6a42736a921
user: jlam <jlam%NetBSD.org@localhost>
date: Wed Aug 27 22:00:06 2003 +0000
description:
Don't allow the stowdir and the pkg_dbdir to be the same. This correctly
disallows manipulating a default view if the default view's PKG_DBDIR is
set to match the location of the package depot so that the metadata for
"overwrite" packages and depoted packages are kept in the same directory.
diffstat:
usr.sbin/pkg_install/view/pkg_view.sh | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 8484f18bcaee -r e6a42736a921 usr.sbin/pkg_install/view/pkg_view.sh
--- a/usr.sbin/pkg_install/view/pkg_view.sh Wed Aug 27 08:09:25 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.sh Wed Aug 27 22:00:06 2003 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: pkg_view.sh,v 1.1.2.33 2003/08/27 08:09:26 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.1.2.34 2003/08/27 22:00:06 jlam Exp $
#
# Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
@@ -149,6 +149,13 @@
#
depot_pkg_dbdir=${stowdir:-${DEPOTBASE:-${viewbase}/packages}}
+case "${depot_pkg_dbdir}" in
+${pkg_dbdir})
+ echo "pkg_view: the depot and the view package database directories are the same" 1>&2
+ exit 1
+ ;;
+esac
+
##########################
# Shell helper functions #
##########################
Home |
Main Index |
Thread Index |
Old Index