summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-14 15:01:34 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-14 15:01:34 +0000
commitf505ec829abf9a7e415e0719cedc26f116f42ff8 (patch)
tree9751f695150953e357beaaca0894437c85a2109d /urpm.pm
parentdfb0b59296ce2b2822dc678b7ff6145b93a57dc8 (diff)
downloadurpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar
urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar.gz
urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar.bz2
urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.tar.xz
urpmi-f505ec829abf9a7e415e0719cedc26f116f42ff8.zip
don't allow calling ->add_media or ->add_distrib_media with unitialised $urpm->{media}
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/urpm.pm b/urpm.pm
index 867e5063..c4762416 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -726,7 +726,7 @@ sub add_medium {
my ($urpm, $name, $url, $with_hdlist, %options) = @_;
#- make sure configuration has been read.
- $urpm->{media} or $urpm->read_config;
+ $urpm->{media} or die "caller should have used ->read_config or ->configure first";
$urpm->lock_urpmi_db('exclusive') if !$options{nolock};
#- if a medium with that name has already been found, we have to exit now
@@ -809,7 +809,7 @@ sub add_distrib_media {
my ($urpm, $name, $url, %options) = @_;
#- make sure configuration has been read.
- $urpm->{media} or $urpm->read_config;
+ $urpm->{media} or die "caller should have used ->read_config or ->configure first";
my $distribconf;