Revert accidental commit of local changes

This commit is contained in:
Frans Pop 2007-06-22 17:10:14 +00:00
parent f096552f3b
commit 16d9f6aed9
1 changed files with 17 additions and 2 deletions

View File

@ -330,14 +330,12 @@ sub add_packages {
$source = $mirror;
if ($arch eq "source") {
m/^Directory: (\S+)/m and $pdir = $1;
$source=$localdebs if $pdir=~m:local/:;
$source=$security if $pdir=~m:updates/:;
m/^ (\S+) (\S+) ((\S+).*dsc)/m and push(@files, "$pdir/$3");
m/^ (\S+) (\S+) ((\S+).*diff.gz)/m and push(@files, "$pdir/$3");
m/^ (\S+) (\S+) ((\S+).*tar.gz)/m and push(@files, "$pdir/$3");
} else {
m/^Filename: (\S+)/mi and push(@files, $1);
$source=$localdebs if $1=~m:local/:;
$source=$security if $1=~m:updates/:;
}
@ -349,6 +347,14 @@ sub add_packages {
foreach my $file (@files) {
my $missing = 0;
# Count how big the file is we're removing, for checking if the disc is full
if (! -e "$source/$file") {
msg_ap(0, "Can't find $file in the main archive, trying local\n");
if (-e "$localdebs/$file") {
$source = $localdebs;
} else {
die "$file not found under either $source or $localdebs\n";
}
}
$realfile = real_file ("$source/$file");
$total_blocks -= get_file_blocks($realfile);
@ -361,7 +367,16 @@ sub add_packages {
$total_blocks += add_md5_entry($dir, $arch, $_);
foreach my $file (@files) {
# And put the file in the CD tree (with a (hard) link)
if (! -e "$source/$file") {
msg_ap(0, "Can't find $file in the main archive, trying local\n");
if (-e "$localdebs/$file") {
$source = $localdebs;
} else {
die "$file not found under either $source or $localdebs\n";
}
}
$realfile = real_file ("$source/$file");
if (! -e "$dir/$file") {