aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-06 11:27:15 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-06 11:27:15 +0000
commitaaa39ae1b853bd0b5ea1a7b4493fc9f05937ab96 (patch)
treeaad28a048bd4ddf7f62a26113d77f6e34b3d7e4f
parent773bfca1888100ecf09b274c1ce43b5572d5f9ff (diff)
downloadrpmdrake-aaa39ae1b853bd0b5ea1a7b4493fc9f05937ab96.tar
rpmdrake-aaa39ae1b853bd0b5ea1a7b4493fc9f05937ab96.tar.gz
rpmdrake-aaa39ae1b853bd0b5ea1a7b4493fc9f05937ab96.tar.bz2
rpmdrake-aaa39ae1b853bd0b5ea1a7b4493fc9f05937ab96.tar.xz
rpmdrake-aaa39ae1b853bd0b5ea1a7b4493fc9f05937ab96.zip
on first run, offer to set up the packages sources (#28050)
-rwxr-xr-xRpmdrake/init.pm14
-rw-r--r--rpmdrake.pm4
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 ] },