From 8f81239fc31a0e33790bb95b2c71b90c39ad888e Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 8 May 2008 07:48:05 +0000 Subject: warn only once about priority upgrades (#39737) --- Rpmdrake/gui.pm | 3 ++- Rpmdrake/pkg.pm | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'Rpmdrake') diff --git a/Rpmdrake/gui.pm b/Rpmdrake/gui.pm index ebd3f2df..0a2458d1 100644 --- a/Rpmdrake/gui.pm +++ b/Rpmdrake/gui.pm @@ -482,7 +482,8 @@ sub ask_browse_tree_given_widgets_for_rpmdrake { $urpm_obj->set_flag_skip(0); } - if ($Rpmdrake::pkg::need_restart) { + if ($Rpmdrake::pkg::need_restart && !$priority_up_alread_warned) { + $priority_up_alread_warned = 1; interactive_msg(N("Warning"), '' . N("Rpmdrake or one of its priority dependencies needs to be updated first. Rpmdrake will then restart.") . '' . "\n\n"); } diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm index 74bde389..e3f2dc92 100644 --- a/Rpmdrake/pkg.pm +++ b/Rpmdrake/pkg.pm @@ -49,6 +49,7 @@ use urpm::args qw(); use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( + $priority_up_alread_warned download_callback extract_header find_installed_version @@ -62,6 +63,9 @@ use ugtk2 qw(:all); use Gtk2::Pango; use Gtk2::Gdk::Keysyms; +our $priority_up_alread_warned; + + sub run_rpm { foreach (qw(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)) { local $ENV{$_} = $ENV{$_} . '.UTF-8' if $ENV{$_} && $ENV{$_} !~ /UTF-8/; @@ -359,6 +363,8 @@ sub get_pkgs { my $_drop_lock = before_leaving { undef $urpm->{lock} }; + $priority_up_alread_warned = 0; + # update media list in case warn_about_media() added some: @update_medias = get_update_medias($urpm); -- cgit v1.2.1