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 Teach pkg_view(1) about "-k <pk...
details: https://anonhg.NetBSD.org/src/rev/45dd4135e861
branches: pkgviews
changeset: 534263:45dd4135e861
user: jlam <jlam%NetBSD.org@localhost>
date: Fri Aug 22 07:13:20 2003 +0000
description:
Teach pkg_view(1) about "-k <pkg_dbdir_dflt>" to override any
PKG_DBDIR_DFLT setting in the environment. Ride the version bump to
20030820.
diffstat:
usr.sbin/pkg_install/view/pkg_view.1 | 21 ++++++++++++++++-----
usr.sbin/pkg_install/view/pkg_view.sh | 6 ++++--
2 files changed, 20 insertions(+), 7 deletions(-)
diffs (72 lines):
diff -r ccbc849354e8 -r 45dd4135e861 usr.sbin/pkg_install/view/pkg_view.1
--- a/usr.sbin/pkg_install/view/pkg_view.1 Thu Aug 21 22:13:06 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.1 Fri Aug 22 07:13:20 2003 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_view.1,v 1.1.2.9 2003/08/21 01:57:24 jlam Exp $
+.\" $NetBSD: pkg_view.1,v 1.1.2.10 2003/08/22 07:13:20 jlam Exp $
.\"
.\" Copyright (c) 2003 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -99,6 +99,15 @@
.Ar package
that should ignored when adding or removing the package from
.Ar view .
+.It Fl k Ar pkg_dbdir_dflt
+Set
+.Ar pkg_dbdir_dflt
+as the package database directory for the default (empty) view.
+If this option isn't specified, then the package database directory is
+taken from the value of the environment variable
+.Ev PKG_DBDIR_DFLT ,
+otherwise it defaults to
+.Pa /var/db/pkg .
.It Fl V
Print the version number and exit.
.It Fl v
@@ -143,11 +152,13 @@
.Sh ENVIRONMENT
.Bl -tag -width indent
.It Ev PKG_DBDIR_DFLT
-The package database directory for the default view,
-.Pa /var/db/pkg ,
-can be overridden by specifying an alternative directory in the
+If the
+.Fl k
+flag isn't given, then the value of the environment variable
.Ev PKG_DBDIR_DFLT
-environment variable.
+is the package database directory for the default view,
+otherwise it defaults to
+.Pa /var/db/pkg .
.It Ev PLIST_IGNORE_FILES
This can be used to specify files in
.Ar package
diff -r ccbc849354e8 -r 45dd4135e861 usr.sbin/pkg_install/view/pkg_view.sh
--- a/usr.sbin/pkg_install/view/pkg_view.sh Thu Aug 21 22:13:06 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.sh Fri Aug 22 07:13:20 2003 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: pkg_view.sh,v 1.1.2.25 2003/08/21 09:14:14 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.1.2.26 2003/08/22 07:13:20 jlam Exp $
#
# Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
@@ -52,7 +52,7 @@
touchprog=/usr/bin/touch
usage() {
- echo 'Usage: pkg_view [-v] [-i ignore] [-w viewname] [-d stowdir] [-W viewbase] add|check|delete pkgname...'
+ echo 'Usage: pkg_view [-v] [-i ignore] [-k pkg_dbdir_dflt] [-w viewname] [-d stowdir] [-W viewbase] add|check|delete pkgname...'
exit 1
}
@@ -83,6 +83,8 @@
-d*) stowdir=`echo $1 | $sedprog -e 's|^-d||'` ;;
-i) ignorefiles="$ignorefiles $2"; shift ;;
-i*) ignorefiles="$ignorefiles `echo $1 | $sedprog -e 's|^-i||'`" ;;
+ -k) dflt_pkg_dbdir="$2"; shift ;;
+ -k*) dflt_pkg_dbdir=`echo $1 | $sedprog -e 's|^-k||'` ;;
-V) version ;;
-v) verbose=yes ;;
-W) viewbase=$2; shift ;;
Home |
Main Index |
Thread Index |
Old Index