From e9640595a49e64dc7cbdf424d783122ebb185ac7 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 26 Mar 2007 11:24:14 +0000 Subject: (warn_about_media) simplify tests workflow (more readable) --- Rpmdrake/pkg.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 5e9ea033..ddb774a9 100755 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -176,8 +176,8 @@ my (@update_medias, $is_update_media_already_asked); sub warn_about_media { my ($urpm, $w, $opts) = @_; my $update_name = 'update_source'; - if (member($::default_list_mode, qw(all_updates security bugfix normal))) { - unless ($::options{'no-media-update'}) { + return if !member($::default_list_mode, qw(all_updates security bugfix normal)); + return if $::options{'no-media-update'}; if (@update_medias > 0) { if (!$opts->{skip_updating_mu} && !$is_update_media_already_asked) { $is_update_media_already_asked = 1; @@ -215,8 +215,6 @@ Then, restart %s.", $rpmdrake::myname_update)), myexit(-1); ); @update_medias = { name => $update_name }; #- hack to simulate a medium for parsing of descriptions } - } - } } our $probe_only_for_updates; -- cgit v1.2.1