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 Ignore the metadata files when ...



details:   https://anonhg.NetBSD.org/src/rev/9e7acc6a0131
branches:  pkgviews
changeset: 534226:9e7acc6a0131
user:      jlam <jlam%NetBSD.org@localhost>
date:      Mon Jul 14 14:26:31 2003 +0000

description:
Ignore the metadata files when we remove a package from a view so we don't
complain about missing files in /usr/pkg.  Also fix the grep expression so
that it really works.

diffstat:

 usr.sbin/pkg_install/view/pkg_view.sh |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 948fd88d7043 -r 9e7acc6a0131 usr.sbin/pkg_install/view/pkg_view.sh
--- a/usr.sbin/pkg_install/view/pkg_view.sh     Mon Jul 14 13:49:58 2003 +0000
+++ b/usr.sbin/pkg_install/view/pkg_view.sh     Mon Jul 14 14:26:31 2003 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: pkg_view.sh,v 1.1.2.9 2003/07/14 13:47:52 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.1.2.10 2003/07/14 14:26:31 jlam Exp $
 
 #
 # Copyright (c) 2001 Alistair G. Crooks.  All rights reserved.
@@ -128,7 +128,7 @@
                        temp=${depot_pkg_dbdir}/$1/+VIEWS.$$
                        $touchprog ${depot_pkg_dbdir}/$1/+VIEWS
                        $cpprog ${depot_pkg_dbdir}/$1/+VIEWS ${temp}
-                       ($grepprog -v "'"'^'${pkg_dbdir}'$'"'" ${temp} || true; echo ${pkg_dbdir}) > ${depot_pkg_dbdir}/$1/+VIEWS
+                       ($grepprog -v '^'${pkg_dbdir}'$' ${temp} || true; echo ${pkg_dbdir}) > ${depot_pkg_dbdir}/$1/+VIEWS
                        $rmprog ${temp}
                        $mkdirprog -p ${pkg_dbdir}/$1
                        (cd ${depot_pkg_dbdir}/$1; $paxprog -rwpe '-s|\./\+VIEWS$||' ./+* ${pkg_dbdir}/$1)
@@ -143,10 +143,11 @@
                if [ ! -f ${pkg_dbdir}/$1/+CONTENTS ]; then
                        echo "Package $1 does not exist in $viewstr."
                else
-                       $linkfarmprog -D --target=${targetdir} --dir=${depot_pkg_dbdir} $1
+                       dbs=`(cd ${depot_pkg_dbdir}/$1; echo +*)`
+                       env PLIST_IGNORE_FILES="${PLIST_IGNORE_FILES} $dbs" $linkfarmprog -D --target=${targetdir} --dir=${depot_pkg_dbdir} $1
                        temp=${depot_pkg_dbdir}/$1/+VIEWS.$$
                        $cpprog ${depot_pkg_dbdir}/$1/+VIEWS ${temp}
-                       ($grepprog -v "'"'^'${pkg_dbdir}'$'"'" ${temp} || true) > ${depot_pkg_dbdir}/$1/+VIEWS
+                       ($grepprog -v '^'${pkg_dbdir}'$' ${temp} || true) > ${depot_pkg_dbdir}/$1/+VIEWS
                        $rmprog ${temp}
                        $rmprog -rf ${pkg_dbdir}/$1
                fi



Home | Main Index | Thread Index | Old Index