summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_audit
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-11-11 11:16:41 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-11-11 11:16:41 +0000
commit9a75ae2f447ba6fc84c5a0ec8444cdc0b3a650f0 (patch)
treef4d68f8f40fbe180d0eaceed7376127491ada8f4 /usr.sbin/pkg_add/pkg_audit
parente31ed5bb4cbddf2694888868ba2244110075a89c (diff)
introduce shortcuts to read/write contents from_installation/to_installation
use these to simplify all those packing lists manipulations. demote non-root detection to a warning in -n mode: fix a couple of minor bugs, of stuff that was run in -n mode and should not. Namely, manpages were indexed/unindexed (ouch) and tempfiles were creating during updates.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_audit')
-rw-r--r--usr.sbin/pkg_add/pkg_audit5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_audit b/usr.sbin/pkg_add/pkg_audit
index ee2e11be94f..c75fcb71659 100644
--- a/usr.sbin/pkg_add/pkg_audit
+++ b/usr.sbin/pkg_add/pkg_audit
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_audit,v 1.2 2004/08/06 07:51:17 espie Exp $
+# $OpenBSD: pkg_audit,v 1.3 2004/11/11 11:16:39 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -25,7 +25,8 @@ use File::Find;
my %found;
for my $pkg (installed_packages()) {
- my $plist = OpenBSD::PackingList->fromfile(installed_info($pkg).CONTENTS, \&OpenBSD::PackingList::FilesOnly);
+ my $plist = OpenBSD::PackingList->from_installation($pkg,
+ \&OpenBSD::PackingList::FilesOnly);
print "$pkg...\n";
for my $item (@{$plist->{items}}) {
next unless $item->IsFile();