From f096552f3b727ba8923f40ad7206ccb151b88a34 Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Fri, 22 Jun 2007 15:18:10 +0000 Subject: [PATCH] Fix indentation --- tools/add_packages | 19 ++----------------- tools/merge_package_lists | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/tools/add_packages b/tools/add_packages index 01759d11..de245847 100755 --- a/tools/add_packages +++ b/tools/add_packages @@ -330,12 +330,14 @@ 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/:; } @@ -347,14 +349,6 @@ 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); @@ -367,16 +361,7 @@ 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") { diff --git a/tools/merge_package_lists b/tools/merge_package_lists index 864e8d95..0eff0328 100755 --- a/tools/merge_package_lists +++ b/tools/merge_package_lists @@ -98,7 +98,7 @@ if [ $source = "yes" ] ; then included[source] = pkg incarch[source] = arch indexnr[source] = FNR - sourcecomp[source] = component + sourcecomp[source] = component } else { if (FNR < indexnr[source]) { printf("# Updating source %s: was due to %d:%s:%s, now moved earlier because of %d:%s:%s\n",