summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2013-11-13 13:01:23 +0100
committerThierry Vignaud <thierry.vignaud@gmail.com>2013-11-13 13:01:23 +0100
commit5e2cb78633952183bf805f1c2223475305d8db6b (patch)
tree7b61c8c047b3756b7da22dd205eb0cf48eeb5e66 /perl-install/any.pm
parent79b08a48f3cff888454ebc4a71db4a3e92d992fd (diff)
downloaddrakx-5e2cb78633952183bf805f1c2223475305d8db6b.tar
drakx-5e2cb78633952183bf805f1c2223475305d8db6b.tar.gz
drakx-5e2cb78633952183bf805f1c2223475305d8db6b.tar.bz2
drakx-5e2cb78633952183bf805f1c2223475305d8db6b.tar.xz
drakx-5e2cb78633952183bf805f1c2223475305d8db6b.zip
log why updates were not applied
log a nice message (urpmi not found or no network) instead of a silent missing feature
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm11
1 files changed, 9 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 26ffacf4f..52dc46bb2 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -946,11 +946,18 @@ sub sessions_with_order() {
sub urpmi_add_all_media {
my ($in, $o_previous_release) = @_;
- my $binary = find { whereis_binary($_, $::prefix) } if_(check_for_xserver(), 'gurpmi.addmedia'), 'urpmi.addmedia' or return;
+ my $binary = find { whereis_binary($_, $::prefix) } if_(check_for_xserver(), 'gurpmi.addmedia'), 'urpmi.addmedia';
+ if (!$binary) {
+ log::l("urpmi.addmedia not found!");
+ return;
+ }
#- configure urpmi media if network is up
require network::tools;
- return if !network::tools::has_network_connection();
+ if (!network::tools::has_network_connection()) {
+ log::l("no network connexion!");
+ return;
+ }
my $wait;
my @options = ('--distrib', '--mirrorlist', '$MIRRORLIST');
if ($binary eq 'urpmi.addmedia') {