diff options
author | Thierry Vignaud <tv@mageia.org> | 2013-04-30 08:47:42 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2013-04-30 08:47:42 +0000 |
commit | 1d39b99ec43bfd0788522ab9e03ae4dbb1aa792c (patch) | |
tree | 6748b24cf018f47a854bf3f43555a32c50af114b | |
parent | 227a5089a0537e17628a34329488539f3d476318 (diff) | |
download | mgaonline-1d39b99ec43bfd0788522ab9e03ae4dbb1aa792c.tar mgaonline-1d39b99ec43bfd0788522ab9e03ae4dbb1aa792c.tar.gz mgaonline-1d39b99ec43bfd0788522ab9e03ae4dbb1aa792c.tar.bz2 mgaonline-1d39b99ec43bfd0788522ab9e03ae4dbb1aa792c.tar.xz mgaonline-1d39b99ec43bfd0788522ab9e03ae4dbb1aa792c.zip |
perl_checker cleanup
-rwxr-xr-x | mgaapplet | 2 | ||||
-rwxr-xr-x | mgaapplet-upgrade-helper | 8 |
2 files changed, 5 insertions, 5 deletions
@@ -265,7 +265,7 @@ Gtk2->main; ugtk2::exit(0); sub gnome_shell_exit_overview() { - eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.freedesktop.DBus.Properties')->Set('org.gnome.Shell', 'OverviewActive', dbus_boolean(0)); }; + eval { Net::DBus->session->get_service('org.gnome.Shell')->get_object('/org/gnome/Shell', 'org.freedesktop.DBus.Properties')->Set('org.gnome.Shell', 'OverviewActive', dbus_boolean(0)) }; } sub is_there_a_new_distributions() { diff --git a/mgaapplet-upgrade-helper b/mgaapplet-upgrade-helper index d5c32a71..f06dade4 100755 --- a/mgaapplet-upgrade-helper +++ b/mgaapplet-upgrade-helper @@ -77,7 +77,7 @@ if (!$new_distro) { if ($new_distro->{needs_preparation}) { my $statefile = "$root/var/lib/mageia-prepare-upgrade/state"; - my $prepared = (cat_($statefile) =~ /ready/) if ( -f $statefile ); + my $prepared = -f $statefile && cat_($statefile) =~ /ready/; if (!$prepared) { ugtk2::ask_yesorno(N("Preparation Required"), N("In order to upgrade, your current installation needs to be prepared.\n\nDo you wish to do this preparation now?")) or exit(0); @@ -87,11 +87,11 @@ if ($new_distro->{needs_preparation}) { $do_pkgs->ensure_is_installed("mageia-prepare-upgrade") or exit(0); # Check to see if installation alone is enough to ensure things are in the right state? - $prepared = (cat_($statefile) =~ /ready/) if ( -f $statefile ); + $prepared = -f $statefile && cat_($statefile) =~ /ready/; if (!$prepared) { my $infofile = "$root/usr/share/doc/mageia-prepare-upgrade/README.prepare"; - my $info = ugtk2::escape_text_for_TextView_markup_format(join '', cat_($infofile)) if ( -f $infofile ); - $info = N("Further action is required before you can continue.\n\nPlease see %s for more information.", $new_distro->{url}) if !$info; + my $info = -f $infofile && ugtk2::escape_text_for_TextView_markup_format(join('', cat_($infofile))); + $info ||= N("Further action is required before you can continue.\n\nPlease see %s for more information.", $new_distro->{url}); ugtk2::ask_warn(N("Next Steps"), $info); exit(0) if !$::testing; log::l("I would validate /var/lib/mageia-prepare-upgrade/state == 'ready'"); |