summaryrefslogtreecommitdiffstats
path: root/rpm-find-leaves
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-07-01 10:54:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-07-01 10:54:37 +0000
commit232693530f1b74e83279e3318c1ed4f566a0e1d4 (patch)
treea2da35174f3b6372a1d1c881fb2784814c10fee3 /rpm-find-leaves
parente7680509b66f204cdb2e3925d333f07746dc4c36 (diff)
downloadurpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar
urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar.gz
urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar.bz2
urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.tar.xz
urpmi-232693530f1b74e83279e3318c1ed4f566a0e1d4.zip
create and use $urpm
Diffstat (limited to 'rpm-find-leaves')
-rw-r--r--rpm-find-leaves6
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;