diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-09-10 09:51:02 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-09-10 09:51:02 +0000 |
commit | 2ffecf951d107c530abc36d397b2f22f97caa301 (patch) | |
tree | 5023e6211985c9326ca4c0563d953df192802336 /Rpmdrake | |
parent | d552c3b4a606b8476021df6264ce42508d385bae (diff) | |
download | rpmdrake-2ffecf951d107c530abc36d397b2f22f97caa301.tar rpmdrake-2ffecf951d107c530abc36d397b2f22f97caa301.tar.gz rpmdrake-2ffecf951d107c530abc36d397b2f22f97caa301.tar.bz2 rpmdrake-2ffecf951d107c530abc36d397b2f22f97caa301.tar.xz rpmdrake-2ffecf951d107c530abc36d397b2f22f97caa301.zip |
(get_installed_packages) workaround looping in URPM->traverse_tag
(especially when using --env)
Diffstat (limited to 'Rpmdrake')
-rw-r--r-- | Rpmdrake/pkg.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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; }); |