diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-07-01 10:54:37 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-07-01 10:54:37 +0000 |
commit | 232693530f1b74e83279e3318c1ed4f566a0e1d4 (patch) | |
tree | a2da35174f3b6372a1d1c881fb2784814c10fee3 | |
parent | e7680509b66f204cdb2e3925d333f07746dc4c36 (diff) | |
download | urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar.gz urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar.bz2 urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar.xz urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.zip |
create and use $urpm
-rw-r--r-- | rpm-find-leaves | 6 |
1 files changed, 4 insertions, 2 deletions
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; |