diff options
author | rjray <devnull@localhost> | 2000-08-08 07:18:47 +0000 |
---|---|---|
committer | rjray <devnull@localhost> | 2000-08-08 07:18:47 +0000 |
commit | 4e248a0e08eb7ac629e6f37e8e639ee87205e869 (patch) | |
tree | 6096a116fc90022f9f2ced6069140f9590fc2324 | |
parent | 7d7f80782c6f068d941379c8c0b808647e63ef9b (diff) | |
download | librpm-tizen-4e248a0e08eb7ac629e6f37e8e639ee87205e869.tar.gz librpm-tizen-4e248a0e08eb7ac629e6f37e8e639ee87205e869.tar.bz2 librpm-tizen-4e248a0e08eb7ac629e6f37e8e639ee87205e869.zip |
Minor changes to reflect new RPM::Database and RPM::Header interfaces.
CVS patchset: 4040
CVS date: 2000/08/08 07:18:47
-rw-r--r-- | Perl-RPM/utils/rpmprune.PL | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Perl-RPM/utils/rpmprune.PL b/Perl-RPM/utils/rpmprune.PL index 822dd7fc8..f092dcb99 100644 --- a/Perl-RPM/utils/rpmprune.PL +++ b/Perl-RPM/utils/rpmprune.PL @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/local/bin/perl use Config; use File::Basename qw(&basename &dirname); @@ -34,19 +34,20 @@ $Config{'startperl'} # In the following, perl variables are not expanded during extraction. print OUT <<'!NO!SUBS!'; + eval 'exec perl -S $0 "$@"' + if 0; use strict; -use vars qw($USAGE $VERSION $revision $cmd %opts %RPM $file $hdr $installed - $ret); +use vars qw($USAGE $VERSION $revision $cmd %opts $file $hdr $installed $ret); use Getopt::Long; use File::Basename qw(basename); -use RPM::Database; +use RPM::Database qw(%RPM); use RPM::Header; $cmd = basename $0; -$revision = q$Revision: 1.2 $; +$revision = q$Revision: 1.3 $; $VERSION = sprintf("%d.%02d", $revision =~ /(\d+)\.(\d+)/); $USAGE = "USAGE: $cmd [ --newer ] [ --older ] [ --equal ] [ --uninst ] @@ -83,8 +84,6 @@ if ($opts{invert}) $opts{$_} = 1 - $opts{$_} for (qw(newer older equal uninst)); } -tie %RPM, "RPM::Database"; - for $file (@ARGV) { $hdr = new RPM::Header $file; @@ -94,7 +93,7 @@ for $file (@ARGV) next; } - $installed = $RPM{$hdr->{name}->[0]}; + $installed = $RPM{$hdr->{name}}; unless ($installed) { # It isn't currently installed, so there is no conflict @@ -200,5 +199,3 @@ Randy J. Ray <rjray@blackperl.com> close OUT or die "Can't close $file: $!"; chmod 0755, $file or die "Can't reset permissions for $file: $!\n"; exec("$Config{'eunicefix'} $file") if $Config{'eunicefix'} ne ':'; - -=cut |