package ftp.debian.org tags 436344 + patch thanks Am Dienstag, 7. August 2007 schrieb ich: > I'm using indices/files/components for custom mirroring. The arch-*.list, > dists.list, source.list, and suite-*.list file lists are merged and > intersected to build the list of files to mirror. > > Tonight I removed source from stable (to save space) and was surprised that > *_all.deb files were to be deleted. These files are listed in > source.list(.gz), but I think they should go into each arch-*.list(.gz).
A worked out a patch to fix it (*.patch1) and another one with some minor improvements (*.patch2). Bye, Timo
--- a/mkfilesindices 2008-01-30 18:22:11.000000000 +0100
+++ b/mkfilesindices 2008-01-31 11:09:22.000000000 +0100
@@ -10,7 +10,7 @@
echo "Querying projectb..."
-echo 'SELECT l.path, f.filename, a.arch_string FROM location l JOIN files f ON (f.location = l.id) LEFT OUTER JOIN (binaries b JOIN architecture a ON (b.architecture = a.id)) ON (f.id = b.file)' | psql projectb -At | sed 's/|//;s/|all$/|/;s,^/srv/ftp.debian.org/ftp,.,' | sort >$ARCHLIST
+echo 'SELECT l.path, f.filename, a.arch_string FROM location l JOIN files f ON (f.location = l.id) LEFT OUTER JOIN (binaries b JOIN architecture a ON (b.architecture = a.id)) ON (f.id = b.file)' | psql projectb -At | sed 's/|//;s,^/srv/ftp.debian.org/ftp,.,' | sort >$ARCHLIST
includedirs () {
perl -ne 'print; while (m,/[^/]+$,) { $_=$`; print $_ . "\n" unless $d{$_}++; }'
@@ -31,9 +31,10 @@
echo "Generating arch lists..."
-ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | sort -u)
+ARCHES=$( (<$ARCHLIST sed -n 's/^.*|//p'; echo amd64) | grep . | grep -v all | sort -u)
for a in $ARCHES; do
(sed -n "s/|$a$//p" $ARCHLIST
+ sed -n 's/|all$//p' $ARCHLIST
cd $base/ftp
find ./dists -maxdepth 1 \! -type d
--- a/mkfilesindices 2008-02-04 00:08:53.000000000 +0100
+++ b/mkfilesindices 2008-01-31 11:09:22.000000000 +0100
@@ -1,5 +1,7 @@
#!/bin/sh -e
+export LC_COLLATE=C
+
export SCRIPTVARS=/srv/ftp.debian.org/dak/config/debian/vars
. $SCRIPTVARS
umask 002
@@ -12,10 +14,6 @@
echo 'SELECT l.path, f.filename, a.arch_string FROM location l JOIN files f ON (f.location = l.id) LEFT OUTER JOIN (binaries b JOIN architecture a ON (b.architecture = a.id)) ON (f.id = b.file)' | psql projectb -At | sed 's/|//;s,^/srv/ftp.debian.org/ftp,.,' | sort >$ARCHLIST
-includedirs () {
- perl -ne 'print; while (m,/[^/]+$,) { $_=$`; print $_ . "\n" unless $d{$_}++; }'
-}
-
poolfirst () {
perl -e '@nonpool=(); while (<>) { if (m,^\./pool/,) { print; } else { push @nonpool, $_; } } print for (@nonpool);'
}
@@ -73,8 +71,7 @@
(cd $base/ftp; find . \! -type d \! -name 'Archive_Maintenance_In_Progress' | sort) >$ARCHLIST
rm -f sundries.list
-zcat *.list.gz | cat - *.list | sort -u |
- diff - $ARCHLIST | sed -n 's/^> //p' > sundries.list
+zcat *.list.gz | cat - *.list | sort -u | comm -13 - $ARCHLIST > sundries.list
echo "Generating files list $(date +"%X")..."
signature.asc
Description: This is a digitally signed message part.

