summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xdraklive-install31
2 files changed, 32 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index beabe8b..8f27bcc 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- allow user to specify a specific mirror and downloader when applying
+ updates at the end of installation
- call mygtk3::flush() more frequently whilst copying the filesystem,
to make the main window more responsive to window events
- use run_program::get_stdout to calculate installed size, to
diff --git a/draklive-install b/draklive-install
index 35afff3..996d6e3 100755
--- a/draklive-install
+++ b/draklive-install
@@ -475,12 +475,41 @@ Do you want to setup the update media?")),
return 0;
};
+ require urpm;
+ require urpm::media;
+
+ my $urpm = urpm->new();
+ $urpm->{log} = \&log::l;
+ urpm::set_files($urpm, $::prefix);
+ urpm::media::read_config($urpm);
+
+ $in->{packages} = $urpm;
+ $in->{product_id} = mageia_release_info();
+
+ require mirror;
+ require urpm::download;
+
+ my $downloader = sub {
+ my ($url) = @_;
+ urpm::download::get_content($urpm, $url);
+ };
+ mirror::register_downloader($downloader);
+
+ my $urpmi_options = { mirror_url => '$MIRRORLIST' };
+
try_again:
enable_network_connection($in);
+ any::ask_mirror_and_downloader($in, $urpmi_options);
+ any::urpmi_set_downloader($in, $urpm, $urpmi_options->{downloader}) || die("Failed to set downloader\n");
+
+ if ($urpmi_options->{mirror_url} ne '$MIRRORLIST') {
+ $urpmi_options->{mirror_url} = any::ask_mirror($in, 'distrib', $urpmi_options->{mirror_url});
+ }
+
clean_rpmdb_shared_regions();
- if (any::urpmi_add_all_media($in)) {
+ if (any::urpmi_add_all_media($in, undef, $urpmi_options->{mirror_url})) {
log::l("successfully added update media");
return 1;
}