summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-18 15:19:26 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-11-18 15:19:26 +0000
commitd30d087596c8b84cde4a598c3527e1f8e75d2368 (patch)
tree338d5680ebf002da7d36ac82f0c0d602d3928abe /urpm.pm
parent413bd7ec8289df17e4b0ae20170ec2047df40f39 (diff)
downloadurpmi-d30d087596c8b84cde4a598c3527e1f8e75d2368.tar
urpmi-d30d087596c8b84cde4a598c3527e1f8e75d2368.tar.gz
urpmi-d30d087596c8b84cde4a598c3527e1f8e75d2368.tar.bz2
urpmi-d30d087596c8b84cde4a598c3527e1f8e75d2368.tar.xz
urpmi-d30d087596c8b84cde4a598c3527e1f8e75d2368.zip
Requires that a magic line appears in reconfig.urpmi (bug #12384)
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/urpm.pm b/urpm.pm
index 8f5d8c8e..11b3bd23 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -837,6 +837,9 @@ sub reconfig_urpmi {
my $reconfigured = 0;
open my $fh, $rfile or return undef;
$urpm->{log}(N("reconfiguring urpmi for media \"%s\"", $name));
+ #- the first line of reconfig.urpmi must be magic, to be sure it's not an error file
+ my $magic = <$fh>;
+ $magic =~ /^# this is an urpmi reconfiguration file/ or return undef;
while (<$fh>) {
chomp;
s/^\s*//; s/#.*$//; s/\s*$//;