aboutsummaryrefslogtreecommitdiffstats
path: root/Rpmdrake/pkg.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Rpmdrake/pkg.pm')
-rwxr-xr-xRpmdrake/pkg.pm17
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}};