summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmgaapplet2
-rwxr-xr-xmgaapplet-upgrade-helper8
2 files changed, 5 insertions, 5 deletions
diff --git a/mgaapplet b/mgaapplet
index cecaa68b..1a7a9ef6 100755
--- a/mgaapplet
+++ b/mgaapplet
@@ -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'");