aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-02-21 18:24:30 +0000
committerThierry Vignaud <tv@mandriva.org>2008-02-21 18:24:30 +0000
commitf7ea1aebb30d5eda6f406e14a78a13131a7d120e (patch)
treeb6228f62e9aab9ff7b0363dfcabc0f6220391328
parent660842368965bc2b8f6e46c63c53149aed1b7c90 (diff)
downloadrpmdrake-f7ea1aebb30d5eda6f406e14a78a13131a7d120e.tar
rpmdrake-f7ea1aebb30d5eda6f406e14a78a13131a7d120e.tar.gz
rpmdrake-f7ea1aebb30d5eda6f406e14a78a13131a7d120e.tar.bz2
rpmdrake-f7ea1aebb30d5eda6f406e14a78a13131a7d120e.tar.xz
rpmdrake-f7ea1aebb30d5eda6f406e14a78a13131a7d120e.zip
(add_distrib_update_media,easy_add_callback,mirrors) only ask for 'distrib' style URLs
-rw-r--r--Rpmdrake/edit_urpm_sources.pm3
-rw-r--r--Rpmdrake/pkg.pm2
-rw-r--r--rpmdrake.pm5
3 files changed, 3 insertions, 7 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm
index 9931f817..8fc731c9 100644
--- a/Rpmdrake/edit_urpm_sources.pm
+++ b/Rpmdrake/edit_urpm_sources.pm
@@ -131,12 +131,11 @@ I need to contact the Mandriva website to get the mirror list.
Please check that your network is currently running.
Is it ok to continue?", $distro),
- want_base_distro => $want_base_distro,
transient => $::main_window,
) or return 0;
ref $mirror or return;
my $wait = wait_msg(N("Please wait, adding media..."));
- add_distrib_update_media($urpm, $mirror);
+ add_distrib_update_media($urpm, $mirror, if_(!$want_base_distro, only_updates => 1));
$offered_to_add_sources->[0] = 1;
remove_wait_msg($wait);
return 1;
diff --git a/Rpmdrake/pkg.pm b/Rpmdrake/pkg.pm
index 6a5a4716..b98aadfd 100644
--- a/Rpmdrake/pkg.pm
+++ b/Rpmdrake/pkg.pm
@@ -287,7 +287,7 @@ launch the Software Media Manager, and then add a `Security
updates' medium.
Then, restart %s.", $rpmdrake::myname_update)), myexit(-1);
- add_distrib_update_media($urpm, $mirror);
+ add_distrib_update_media($urpm, $mirror, only_updates => 1);
}
}
diff --git a/rpmdrake.pm b/rpmdrake.pm
index afa4c599..27da6150 100644
--- a/rpmdrake.pm
+++ b/rpmdrake.pm
@@ -512,8 +512,7 @@ sub mirrors {
$res or do { c::set_tagged_utf8($res); die $res };
return cat_($file);
});
- my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(cat_('/etc/product.id')),
- ($want_base_distro ? 'distrib' : 'updates')) || [] };
+ my @mirrors = @{ mirror::list(common::parse_LDAP_namespace_structure(cat_('/etc/product.id')), 'distrib') || [] };
require timezone;
my $tz = ${timezone::read()}{timezone};
foreach my $mirror (@mirrors) {
@@ -871,7 +870,6 @@ It will be disabled.",
sub add_distrib_update_media {
my ($urpm, $mirror, %options) = @_;
- my $is_update = $mirror->{type} eq 'updates';
#- ensure a unique medium name
my $medium_name = $rpmdrake::mandrake_release =~ /(\d+\.\d+) \((\w+)\)/ ? $2 . $1 . '-' : 'distrib';
my $initial_number = 1 + max map { $_->{name} =~ /\(\Q$medium_name\E(\d+)\b/ ? $1 : 0 } @{$urpm->{media}};
@@ -880,7 +878,6 @@ sub add_distrib_update_media {
{ nolock => 1, distrib => 1 },
$medium_name, $mirror->{url}, probe_with => 'synthesis', initial_number => $initial_number, %options,
usedistrib => 1,
- if_($is_update, only_updates => 1),
);
}