diff --git a/infrastructure/package/check-manpages b/infrastructure/package/check-manpages index 6043910c7ca..91aedccb7a1 100755 --- a/infrastructure/package/check-manpages +++ b/infrastructure/package/check-manpages @@ -1,5 +1,5 @@ #! /usr/bin/perl -# $OpenBSD: check-manpages,v 1.4 2004/11/13 11:49:48 espie Exp $ +# $OpenBSD: check-manpages,v 1.5 2005/09/13 20:48:41 espie Exp $ # # Copyright (c) 2004 Marc Espie # @@ -56,6 +56,8 @@ for my $pkgname (@ARGV) { } } $true_package->close(); + $true_package->wipe_info(); + $plist->forget(); } print STDERR "Running makewhatis in ", join(' ', keys(%mandirs)), "\n"; diff --git a/infrastructure/package/check-newlib-depends b/infrastructure/package/check-newlib-depends index fa5a59c7115..6774d0c4fd6 100755 --- a/infrastructure/package/check-newlib-depends +++ b/infrastructure/package/check-newlib-depends @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $OpenBSD: check-newlib-depends,v 1.10 2005/09/10 09:48:54 espie Exp $ +# $OpenBSD: check-newlib-depends,v 1.11 2005/09/13 20:48:41 espie Exp $ # Copyright (c) 2004 Marc Espie # # Permission to use, copy, modify, and distribute this software for any @@ -254,7 +254,7 @@ sub do_pkg my $plist = OpenBSD::PackingList->fromfile($dir.CONTENTS); analyze($plist, $db, $true_package); $true_package->close(); - rmtree($dir); + $true_package->wipe_info(); $plist->forget(); return 1; } diff --git a/infrastructure/package/find-plist-issues b/infrastructure/package/find-plist-issues index ed3835aceda..2127df8cb54 100755 --- a/infrastructure/package/find-plist-issues +++ b/infrastructure/package/find-plist-issues @@ -1,6 +1,6 @@ #! /usr/bin/perl -# $OpenBSD: find-plist-issues,v 1.2 2005/09/05 14:39:57 espie Exp $ +# $OpenBSD: find-plist-issues,v 1.3 2005/09/13 20:48:41 espie Exp $ # Copyright (c) 2000-2005 # Marc Espie. All rights reserved. # Redistribution and use in source and binary forms, with or without @@ -302,16 +302,10 @@ my $db = {}; my $mtree = {}; our ($opt_d, $opt_v, $opt_C, $opt_D); - -sub handle_file +sub handle_plist { - my $filename = shift; - my $plist = OpenBSD::PackingList->fromfile($filename); - if (!defined $plist) { - print STDERR "Error reading $filename\n"; - return; - } - print "$filename -> ", $plist->pkgname(), "\n" if $opt_v; + my $plist = shift; + print $plist->pkgname(), "\n" if $opt_v; $plist->forget(); if ($opt_C) { $conflicts->{$plist->pkgname()} = @@ -323,6 +317,18 @@ sub handle_file } } + +sub handle_file +{ + my $filename = shift; + my $plist = OpenBSD::PackingList->fromfile($filename); + if (!defined $plist) { + print STDERR "Error reading $filename\n"; + return; + } + handle_plist($plist); +} + set_usage('find-all-conflicts [-vCD] [-d plist_dir] [pkgname ...]'); try { getopts('d:vCD'); @@ -360,16 +366,14 @@ if ($opt_d) { @ARGV=(<*.tgz>); } -push(@available, map { s,.*/,,; s/\.tgz$//; } @ARGV); +my @pkgs = @ARGV; +push(@available, map { s,.*/,,; s/\.tgz$//; } @pkgs); for my $pkgname (@ARGV) { print STDERR "$pkgname\n"; - my $true_package = OpenBSD::PackageLocator->find($pkgname); - next unless $true_package; - my $dir = $true_package->info(); - $true_package->close(); - handle_file($dir.CONTENTS); - rmtree($dir); + my $plist = OpenBSD::PackageLocator->grabPlist($pkgname); + next unless $plist; + handle_plist($plist); } print "File problems:\n";