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 If +REQUIRED_BY is empty, then ...
details: https://anonhg.NetBSD.org/src/rev/dd2eadec3fc7
branches: pkgviews
changeset: 534258:dd2eadec3fc7
user: jlam <jlam%NetBSD.org@localhost>
date: Thu Aug 21 02:48:31 2003 +0000
description:
If +REQUIRED_BY is empty, then treat it like it's not there.
diffstat:
usr.sbin/pkg_install/view/pkg_view.sh | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r d79d4fba3836 -r dd2eadec3fc7 usr.sbin/pkg_install/view/pkg_view.sh
--- a/usr.sbin/pkg_install/view/pkg_view.sh Thu Aug 21 01:57:22 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.sh Thu Aug 21 02:48:31 2003 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
-# $NetBSD: pkg_view.sh,v 1.1.2.23 2003/08/21 01:57:24 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.1.2.24 2003/08/21 02:48:31 jlam Exp $
#
# Copyright (c) 2001 Alistair G. Crooks. All rights reserved.
@@ -36,6 +36,7 @@
# set up program definitions
chmodprog=/bin/chmod
+cmpprog=/usr/bin/cmp
cpprog=/bin/cp
envprog=/usr/bin/env
findprog=/usr/bin/find
@@ -181,9 +182,13 @@
echo "Deleting package $1 from $viewstr in ${viewbase}."
fi
if [ -f ${pkg_dbdir}/$1/+REQUIRED_BY ]; then
- (echo "pkg_view: package \`$1' is required by other packages:"
- $sedprog -e 's|^| |' ${pkg_dbdir}/$1/+REQUIRED_BY) 1>&2
- exit 1
+ if $cmpprog -s ${pkg_dbdir}/$1/+REQUIRED_BY /dev/null; then
+ : not really required by another pkg
+ else
+ (echo "pkg_view: package \`\`$1'' is required by other packages:"
+ $sedprog -e 's|^| |' ${pkg_dbdir}/$1/+REQUIRED_BY) 1>&2
+ exit 1
+ fi
fi
if [ -f ${pkg_dbdir}/$1/+DEINSTALL ]; then
$chmodprog +x ${pkg_dbdir}/$1/+DEINSTALL
Home |
Main Index |
Thread Index |
Old Index