summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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*$//;