diff options
-rwxr-xr-x | Rpmdrake/init.pm | 14 | ||||
-rw-r--r-- | rpmdrake.pm | 4 |
2 files changed, 17 insertions, 1 deletions
diff --git a/Rpmdrake/init.pm b/Rpmdrake/init.pm index 8f0476b2..dee521cd 100755 --- a/Rpmdrake/init.pm +++ b/Rpmdrake/init.pm @@ -145,6 +145,20 @@ you want to install on your computer."))) , yesno => 1) or myexit(-1); push @$already_splashed, $MODE; } + if (!$> && !$offered_to_add_sources->[0]) { + if (interactive_msg(N("Welcome"), + join("\n\n", + N("The software installation tool can set up media sources."), + N("Do you want to add media sources now?"), + ), + yesno => 1, + ) + ) { + require Rpmdrake::edit_urpm_sources; + Rpmdrake::edit_urpm_sources::easy_add_callback(); + } + $offered_to_add_sources->[0] = 1; + } } 1; diff --git a/rpmdrake.pm b/rpmdrake.pm index 5f906c58..97b8c7f4 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -51,6 +51,7 @@ our @EXPORT = qw( $mandrakeupdate_wanted_categories $already_splashed $max_info_in_descr + $offered_to_add_sources $tree_mode $tree_flat $typical_width @@ -150,11 +151,12 @@ $ENV{HOME} ||= '/root'; our $configfile = "$ENV{HOME}/.rpmdrake"; our ($already_splashed, $changelog_first_config, $max_info_in_descr, $tree_flat, $tree_mode); -our ($automatically_update_kernels, $mandrakeupdate_wanted_categories); +our ($automatically_update_kernels, $mandrakeupdate_wanted_categories, $offered_to_add_sources); our %config = ( mandrakeupdate_wanted_categories => { var => \$mandrakeupdate_wanted_categories, default => [ qw(security) ] }, already_splashed => { var => \$already_splashed, default => [] }, max_info_in_descr => { var => \$max_info_in_descr, default => [] }, + offered_to_add_sources => { var => \$offered_to_add_sources, default => [ 0 ] }, tree_mode => { var => \$tree_mode, default => [ qw(mandrake_choices) ] }, tree_flat => { var => \$tree_flat, default => [ 0 ] }, changelog_first_config => { var => \$changelog_first_config, default => [ 0 ] }, |