From 2ffecf951d107c530abc36d397b2f22f97caa301 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 10 Sep 2008 09:51:02 +0000 Subject: (get_installed_packages) workaround looping in URPM->traverse_tag (especially when using --env) --- Rpmdrake/pkg.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Rpmdrake') 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; }); -- cgit v1.2.1