diff options
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r-- | perl-install/any.pm | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index 27bae9ac1..3e90bc32f 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -663,7 +663,6 @@ sub get_autologin() { my %desktop_to_dm = ( GNOME => 'gdm', KDE4 => 'kdm', - xfce4 => 'gdm', LXDE => 'lxdm', ); my %dm_canonical = ( @@ -947,18 +946,25 @@ 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') { $wait = $in->wait_message(N("Please wait"), N("Please wait, adding media...")); } elsif ($in->isa('interactive::gtk')) { push @options, '--silent-success'; - mygtk2::flush(); + mygtk3::flush(); } my $reason = join(',', $o_previous_release ? @@ -970,18 +976,6 @@ sub urpmi_add_all_media { my $log_file = '/root/drakx/updates.log'; my $val = run_program::rooted($::prefix, $binary, '>>', $log_file, '2>>', $log_file, @options); - if ($val) { - #- enable Nonfree/Tainted repositories if a package having a matching name is installed - #- FIXME: this only works for Nonfree for now thanks to kernel-firmware-nonfree - #- for Tainted to work and for better Nonfree support, we should search in package releases as well - foreach my $media (qw(Nonfree Tainted)) { - $in->do_pkgs->are_installed("*" . lc($media) . "*") or next; - foreach my $type (qw(Release Updates)) { - run_program::rooted($::prefix, '/usr/libexec/urpmi.update', '--no-ignore', "$media $type"); - } - } - } - undef $wait; $val; } @@ -1021,27 +1015,27 @@ sub display_release_notes { return; } - require Gtk2::WebKit; - require ugtk2; - ugtk2->import(':all'); - require mygtk2; - mygtk2->import('gtknew'); + require Gtk3::WebKit; + require ugtk3; + ugtk3->import(':all'); + require mygtk3; + mygtk3->import('gtknew'); my $view = gtknew('WebKit_View', no_popup_menu => 1); $view->load_html_string($release_notes, '/'); - my $w = ugtk2->new(N("Release Notes"), transient => $::main_window, modal => 1, pop_it => 1); + my $w = ugtk3->new(N("Release Notes"), transient => $::main_window, modal => 1, pop_it => 1); gtkadd($w->{rwindow}, - gtkpack_(Gtk2::VBox->new, - 1, create_scrolled_window(ugtk2::gtkset_border_width($view, 5), + gtkpack_(Gtk3::VBox->new, + 1, create_scrolled_window(ugtk3::gtkset_border_width($view, 5), [ 'never', 'automatic' ], ), 0, gtkpack(create_hbox('end'), gtknew('Button', text => N("Close"), - clicked => sub { Gtk2->main_quit }) + clicked => sub { Gtk3->main_quit }) ), ), ); - mygtk2::set_main_window_size($w->{rwindow}); + mygtk3::set_main_window_size($w->{rwindow}); $w->{real_window}->grab_focus; $w->{real_window}->show_all; $w->main; @@ -1072,7 +1066,7 @@ sub get_release_notes { sub run_display_release_notes { my ($release_notes) = @_; output('/tmp/release_notes.html', $release_notes); - system('/usr/bin/display_release_notes.pl'); + run_program::raw({ detach => 1 }, '/usr/bin/display_release_notes.pl'); } sub acceptLicense { @@ -1195,7 +1189,7 @@ sub selectLanguage_standalone { ]); $locale->{utf8} = !$non_utf8; lang::set($locale); - Gtk2->set_locale if $in->isa('interactive::gtk'); + c::init_setlocale() if $in->isa('interactive::gtk'); lang::lang_changed($locale) if $old_lang ne $locale->{lang}; } |