summaryrefslogtreecommitdiffstats
path: root/mdkupdate
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2006-02-23 20:08:16 +0000
committerDaouda Lo <daouda@mandriva.com>2006-02-23 20:08:16 +0000
commit2b3efe388b558390b9f9bfdacab7bbc5c7c0abf3 (patch)
treeb3a26e80bf170be4fa047ae4529035b67833a761 /mdkupdate
parentf7609b45ec81c41ea0a1bbc4fc48c74c5636a88f (diff)
downloadmgaonline-2b3efe388b558390b9f9bfdacab7bbc5c7c0abf3.tar
mgaonline-2b3efe388b558390b9f9bfdacab7bbc5c7c0abf3.tar.gz
mgaonline-2b3efe388b558390b9f9bfdacab7bbc5c7c0abf3.tar.bz2
mgaonline-2b3efe388b558390b9f9bfdacab7bbc5c7c0abf3.tar.xz
mgaonline-2b3efe388b558390b9f9bfdacab7bbc5c7c0abf3.zip
- install bundle with same code than --auto option
Diffstat (limited to 'mdkupdate')
-rwxr-xr-xmdkupdate24
1 files changed, 9 insertions, 15 deletions
diff --git a/mdkupdate b/mdkupdate
index 5dc5778a..76525046 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -88,6 +88,10 @@ GetOptions(%options);
$bundle eq "webbundle" and mdkonline::get_site($startpage), exit(0);
+my $in;
+
+$bundle || $noX and $in = interactive->vnew;
+
my $result;
my $wc = mdkonline::read_conf();
-e $logfile and system "/bin/rm", $logfile;
@@ -107,7 +111,6 @@ if (!$bundle) {
my $is_no_media_update = $release <= 10.1 ? '' : "--no-media-update";
system $rpm_exec_name, "--no-confirmation", $is_no_media_update, "--media=update_source";
} elsif ($noX) {
- my $in = interactive->vnew;
my $pkgs = ask_pkgs($in);
install_pkgs($in, $pkgs, 'update_source') if $pkgs;
$in->exit(0);
@@ -140,9 +143,12 @@ if (!$bundle) {
$res eq 'OK' and $bundle_info = mdkonline::soap_query_bundle($wc, $bundle_vars{BUNDLE});
print Dumper($bundle_info);
if ($bundle_info->{status}) {
- my ($media, $mirror) = ($bundle_info->{data}->{media_name}, $bundle_info->{data}->{mirror});
+ my @bundles;
+ my ($media, $mirror, $bundle) = ($bundle_info->{data}->{media_name}, $bundle_info->{data}->{mirror}, $bundle_info->{data}->{bundle});
add_media($media, $mirror, 'hdlist.cz');
- install_pkgs($int, $bundle_info->{data}->{bundle}, $media);
+ $bundle =~ s/\.rpm$//;
+ push(@bundles, $bundle);
+ install_pkgs($in, \@bundles, $media);
}
}
@@ -208,18 +214,6 @@ sub my_fullname {
"$name-$version-$release";
}
-sub split_contents {
- my $cont = shift;
- my ($elem, $s);
- $s = [ split /\n/, $cont ];
- $elem->{torf} = $s->[0];
- if ($elem->{torf} eq 'TRUE') {
- ($elem->{torf}, $elem->{NEWKEY}, $elem->{OLDKEY}, $elem->{FTP}) = splice(@$s, 0, 4);
- ($elem->{sched}, $elem->{nosched}) = partition { /(i586|ppc|ia64|noarch|x86_64|amd64|ppc64)$/ } @$s;
- }
- $elem;
-}
-
sub auto_install_rpms {
my ($pkgs) = shift;
my @pkg;