aboutsummaryrefslogtreecommitdiffstats
path: root/rpmdrake.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-25 06:47:53 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-25 06:47:53 +0000
commitdf28b302207b4b425760e4cc6e47e8fad0fee8d4 (patch)
tree333e063725a59fde2a9dc28ce323e66490179fe1 /rpmdrake.pm
parent3a0743f05523085631b244e5182466cfeac172f6 (diff)
downloadrpmdrake-df28b302207b4b425760e4cc6e47e8fad0fee8d4.tar
rpmdrake-df28b302207b4b425760e4cc6e47e8fad0fee8d4.tar.gz
rpmdrake-df28b302207b4b425760e4cc6e47e8fad0fee8d4.tar.bz2
rpmdrake-df28b302207b4b425760e4cc6e47e8fad0fee8d4.tar.xz
rpmdrake-df28b302207b4b425760e4cc6e47e8fad0fee8d4.zip
(update_sources_noninteractive) split it out of update_sources_interactive()
Diffstat (limited to 'rpmdrake.pm')
-rw-r--r--rpmdrake.pm15
1 files changed, 11 insertions, 4 deletions
diff --git a/rpmdrake.pm b/rpmdrake.pm
index 338b11fd..a355d6bf 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -81,6 +81,7 @@ our @EXPORT = qw(
update_sources
update_sources_check
update_sources_interactive
+ update_sources_noninteractive
add_medium_and_check
check_update_media_version
strip_first_underscore
@@ -791,20 +792,26 @@ sub update_sources_interactive {
)
);
if ($w->main) {
+ update_sources_noninteractive($urpm, \@media, %options);
+ }
+ return 0;
+}
+
+sub update_sources_noninteractive {
+ my ($urpm, $media, %options) = @_;
+
#- force ignored media to be returned alive (forked from urpmi.update...)
foreach (@{$urpm->{media}}) {
$_->{modified} and delete $_->{ignore};
}
- urpm::media::select_media($urpm, @media);
+ urpm::media::select_media($urpm, @$media);
update_sources_check(
$urpm,
{},
N_("Unable to update medium; it will be automatically disabled.\n\nErrors:\n%s"),
- @media,
+ @$media,
);
return 1;
- }
- return 0;
}
sub add_medium_and_check {