# system("cp debian/Contents-potato-i386-non-US.gz debian/Contents-woody-i386-non-US.gz");
# }
+ my $exit = CORE::system("/bin/gzip -t $file >/dev/null 2>&1");
+ if ($exit) {
+ &::WARN("deb: $file is corrupted :/");
+ unlink $file;
+ next;
+ }
+
&::DEBUG("deb: download: good.") if ($debug);
$good++;
} else {
}
# ok... lets just run this.
- &::miscCheck();
+ &::miscCheck() if (&::whatInterface() =~ /IRC/);
if ($good) {
&generateIndex($dist);
while (<IN>) {
last if ($found > 100);
- next unless if (/^\.?\/?(.*?)[\t\s]+(\S+)\n$/);
-
+ next unless (/^\.?\/?(.*?)[\t\s]+(\S+)\n$/);
my ($file,$package) = ("/".$1,$2);
+
if ($query =~ /[\/\*\\]/) {
next unless (eval { $file =~ /$regex/ });
return unless &checkEval($@);
$package = "";
} else {
+ chop;
&::WARN("debian: invalid line: '$_' (1).");
}
}
$package = "";
} else {
+ chop;
&::WARN("debian: invalid line: '$_'. (2)");
}
}
# package line.
if (/^Package: (.*)\n$/) {
$pkg = $1;
- if ($pkg =~ /^$package$/i) {
+ if ($pkg =~ /^\Q$package\E$/i) {
$found++; # we can use pkg{'package'} instead.
$pkg{'package'} = $pkg;
}
# Usage: &generateIndex();
sub generateIndex {
my (@dists) = @_;
- &::status("Debian: !!! generateIndex($dists[0]) called !!!");
+ &::DEBUG("D: generateIndex($dists[0]) called!");
if (!scalar @dists or $dists[0] eq '') {
&::ERROR("gI: no dists to generate index.");
return 1;
}
if ($error) {
- &::ERROR("could not generate index ($file)!!!");
+ &::ERROR("could not generate index ($file)!");
return;
}