diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-02-20 14:12:58 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-02-20 14:12:58 +0000 |
commit | f8882e663bcc1dcd99ab8ffee9a7034cac644338 (patch) | |
tree | bf371caa375b49a7828ed18c272e3f0b96f339ec | |
parent | 4c55acc0759a2768f52b5d10e2591e43fbe37647 (diff) | |
download | rpmdrake-f8882e663bcc1dcd99ab8ffee9a7034cac644338.tar rpmdrake-f8882e663bcc1dcd99ab8ffee9a7034cac644338.tar.gz rpmdrake-f8882e663bcc1dcd99ab8ffee9a7034cac644338.tar.bz2 rpmdrake-f8882e663bcc1dcd99ab8ffee9a7034cac644338.tar.xz rpmdrake-f8882e663bcc1dcd99ab8ffee9a7034cac644338.zip |
(get_pkgs) do not reuse existing urpm object since it "remember" previous
operations it has done (thus fixing "cannot see uninstalled packages" bug,
#25991)
-rwxr-xr-x | Rpmdrake/pkg.pm | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 2e9742b0..7bb24cdd 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -192,16 +192,15 @@ sub get_pkgs { Rpmdrake::gurpm::init(1 ? N("Please wait") : N("Package installation..."), N("Initializing..."), transient => $::w->{real_window}); my $_guard = before_leaving { Rpmdrake::gurpm::end() }; - if (!$urpm) { - $urpm ||= urpm->new; - $urpm->{fatal} = $fatal_handler; - my $media = ref $::options{media} ? join(',', @{$::options{media}}) : ''; - urpm::media::configure($urpm, media => $media); - if ($error_happened) { - touch('/etc/urpmi/urpmi.cfg'); - exec('edit-urpm-sources.pl'); - } + $urpm = urpm->new; + $urpm->{fatal} = $fatal_handler; + my $media = ref $::options{media} ? join(',', @{$::options{media}}) : ''; + urpm::media::configure($urpm, media => $media); + if ($error_happened) { + touch('/etc/urpmi/urpmi.cfg'); + exec('edit-urpm-sources.pl'); } + my $_lock = urpm::lock::urpmi_db($urpm); my $statedir = $urpm->{statedir}; @update_medias = grep { !$_->{ignore} && $_->{update} } @{$urpm->{media}}; |