summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2004-01-13 15:57:28 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2004-01-13 15:57:28 +0000
commit45219a97f50e6c6328d14da239c0fea7192e4007 (patch)
tree68422c437f2b904d0fa9477990bd096b2ee2b2b7 /urpm.pm
parentbc1eba5a5ced035717c0b9000bd1015c5551d289 (diff)
downloadurpmi-45219a97f50e6c6328d14da239c0fea7192e4007.tar
urpmi-45219a97f50e6c6328d14da239c0fea7192e4007.tar.gz
urpmi-45219a97f50e6c6328d14da239c0fea7192e4007.tar.bz2
urpmi-45219a97f50e6c6328d14da239c0fea7192e4007.tar.xz
urpmi-45219a97f50e6c6328d14da239c0fea7192e4007.zip
add --use-distrib code
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index 8c3e9dca..decfd7d4 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -787,7 +787,12 @@ sub configure {
$urpm->{options}{'split-length'} = 0;
}
} else {
- $urpm->read_config(%options);
+ if ($options{usedistrib}) {
+ $urpm->{media} = [];
+ $urpm->add_distrib_media("Virtual", $options{usedistrib}, %options, 'virtual' => 1);
+ } else {
+ $urpm->read_config(%options);
+ }
if ($options{media}) {
delete $_->{modified} foreach @{$urpm->{media} || []};
$urpm->select_media(split ',', $options{media});
@@ -918,6 +923,7 @@ sub add_medium {
my ($urpm, $name, $url, $with_hdlist, %options) = @_;
#- make sure configuration has been read.
+ # (Olivier Thauvin) Yes but Why ??? Is this a workaround ?
$urpm->{media} or $urpm->read_config();
#- if a medium with that name has already been found
@@ -986,6 +992,7 @@ sub add_distrib_media {
my ($hdlists_file);
#- make sure configuration has been read.
+ # (Olivier Thauvin): Is this a workaround ?
$urpm->{media} or $urpm->read_config();
#- try to copy/retrive Mandrake/basehdlists file.