summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-03-03 23:04:20 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-03-03 23:04:20 +0000
commit59c79ce165a75af2437df5d3937e7c069721bdb6 (patch)
tree9e596cdce42b6ca8fac29cfbaebd49ccd2d1f5dc /mdkupdate
parent684e7adca84aba65e552e004d2ce0eacd07f8f0b (diff)
downloadmgaonline-59c79ce165a75af2437df5d3937e7c069721bdb6.tar
mgaonline-59c79ce165a75af2437df5d3937e7c069721bdb6.tar.gz
mgaonline-59c79ce165a75af2437df5d3937e7c069721bdb6.tar.bz2
mgaonline-59c79ce165a75af2437df5d3937e7c069721bdb6.tar.xz
mgaonline-59c79ce165a75af2437df5d3937e7c069721bdb6.zip
- use --media in order to list medias to use
- use --searchmedia in order to specify the media to look for bundles - use gurpmi in order to install bundles - split the bundle case from the normal one
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate15
1 files changed, 12 insertions, 3 deletions
diff --git a/mdkupdate b/mdkupdate
index cb337687..0cdf92d8 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -155,7 +155,11 @@ You need to update to a newer version. You can get a new one from http://start.m
add_media($_, $mirrors{$_}, 'media_info/hdlist.cz', '') foreach keys %mirrors;
$bundle =~ s/-[^-]*-[^-]*\.[^.]*\.rpm$//;
push @bundles, $bundle;
- install_pkgs($in, \@bundles, (find { /^bundle/ } keys %mirrors), { is_bundle => 1, auto_select => ($wc->{POST} =~ /AUTO_SELECT/) });
+ install_pkgs($in, \@bundles, (find { /^bundle/ } keys %mirrors),
+ { is_bundle => 1,
+ auto_select => ($wc->{POST} =~ /AUTO_SELECT/ ? 1 : 0),
+ medias => [ keys %mirrors ],
+ });
} else {
$in->ask_warn(N("Error"), N("An error occurred") . "\n\n" . $bundle_info->{message});
}
@@ -190,8 +194,13 @@ sub install_pkgs {
$o_options ||= {};
my $w = $in->wait_message(N("Please wait"), N("Installing packages ...\n"));
eval {
- system "/usr/sbin/urpmi", "--auto", "--media", $media_name, @$choosed;
- system "/usr/sbin/urpmi", if_($o_options->{auto_select}, "--auto-select"), "--media", $media_name if $o_options->{is_bundle};
+ if (!$o_options->{is_bundle}) {
+ system "/usr/sbin/urpmi", "--auto", "--media", $media_name, @$choosed;
+ } else {
+ system "/usr/bin/gurpmi", if_($o_options->{auto_select}, "--auto-select"),
+ if_($o_options->{medias}, "--media", join(',', @{$o_options->{medias}})),
+ "--searchmedia", $media_name, @$choosed;
+ }
$? == 0 or die N("Unable to update packages from update_source medium.\n");
};
undef $w;