aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--Rpmdrake/pkg.pm5
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 37dca76c..3039ee38 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,5 @@
- fix opening the right RPM DB with --env
+- workaround looping in URPM->traverse_tag when using --env
Version 4.18.1 - 9 September 2008, Thierry Vignaud
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 476b4477..06299a94 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -307,13 +307,16 @@ sub get_installed_packages {
my ($urpm, $db, $all_pkgs, $gurpm) = @_;
my @base = ("basesystem", split /,\s*/, $urpm->{global_config}{'prohibit-remove'});
- my (%base, %basepackages, @installed_pkgs);
+ my (%base, %basepackages, @installed_pkgs, @processed_base);
reset_pbar_count(0.33);
while (defined(local $_ = shift @base)) {
exists $basepackages{$_} and next;
$db->traverse_tag(m|^/| ? 'path' : 'whatprovides', [ $_ ], sub {
update_pbar($gurpm);
my $name = urpm_name($_[0]);
+ # workaround looping in URPM:
+ return if member($name, @processed_base);
+ push @processed_base, $name;
push @{$basepackages{$_}}, $name;
push @base, $_[0]->requires_nosense;
});