From 232693530f1b74e83279e3318c1ed4f566a0e1d4 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 1 Jul 2008 10:54:37 +0000 Subject: create and use $urpm --- rpm-find-leaves | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'rpm-find-leaves') diff --git a/rpm-find-leaves b/rpm-find-leaves index b257d25f..e8c544ba 100644 --- a/rpm-find-leaves +++ b/rpm-find-leaves @@ -20,10 +20,12 @@ where [options] are from ", $options{group}) . N(" -f - output rpm full name (NVRA) "); +my $urpm = urpm->new; + while ($_ = shift) { $_ eq '--root' and do { my $root = shift; - $root and $options{root} = $root; + $root and urpm::set_files($urpm, $root); next; }; @@ -40,7 +42,7 @@ while ($_ = shift) { my @packages; { - my $db = URPM::DB::open($options{root}) or die "Can't open RPM db\n"; + my $db = urpm::db_open_or_die_($urpm) or die "Can't open RPM db\n"; $db->traverse(sub { my ($p) = @_; $p->pack_header; -- cgit v1.2.1