# Uncomment to clean the .db (cache)
# rm tmp/*
- # Prepare pool
- d=pool/dists/$dist
- if test ! -d $d; then mkdir -p $d; fi
- mkdir -p $d/source
- # Remove invalid symlinks (source, i386, amd64,..)
- for l in $d/*/*; do
- if test -L $l; then
- if test ! -f $l; then
- rm $l
+ for section in main non-free; do
+ # Prepare pool
+ d=pool/dists/$dist/$section
+ if test ! -d $d; then mkdir -p $d; fi
+ mkdir -p $d/source
+ # Remove invalid symlinks (source, i386, amd64,..)
+ for l in $d/*/*; do
+ if test -L "$l"; then
+ if test ! -f "$l"; then
+ rm $l
+ fi
fi
- fi
- done
- # Make symlinks from the regular FTP archive
- ln -sf /home/ftp/pub/*/$vendor/$dist/*.dsc $d/source
- ln -sf /home/ftp/pub/*/$vendor/$dist/*.gz $d/source
- for arch in $architectures; do
- mkdir -p $d/${arch}
- for f in /home/ftp/pub/*/$vendor/$dist/*_${arch}.* \
- /home/ftp/pub/*/$vendor/$dist/*_all.*; do
- if test -f $f; then
- ln -sf $f $d/${arch}
+ done
+ # Make symlinks from the regular FTP archive
+ for pdir in /home/ftp/pub/*; do
+ use=false
+ if test -f $pdir/.htaccess -a $section = "non-free"; then
+ use=true
+ fi
+ if test ! -f $pdir/.htaccess -a $section = "main"; then
+ use=true
+ fi
+ if $use; then
+ distdir=$pdir/$vendor/$dist
+ if test -d $distdir; then
+ ln -sf $distdir/*.dsc $d/source
+ ln -sf $distdir/*.gz $d/source
+ for arch in $architectures; do
+ mkdir -p $d/${arch}
+ for f in $pdir/.htaccess \
+ $distdir/*_${arch}.* \
+ $distdir/*_all.*; do
+ if test -f $f; then
+ ln -sf $f $d/${arch}
+ fi
+ done
+ done
+ fi
fi
done
- #ln -sf /home/ftp/pub/*/$vendor/$dist/*_${arch}.* $d/${arch}
- #ln -sf /home/ftp/pub/*/$vendor/$dist/*_all.* $d/${arch}
- done
-
- # ${confdir}/symclean.sh $d
-
- for arch in $architectures; do
- d=dists/$dist/main/binary-$arch
- if test ! -d $d; then mkdir -p $d; fi
- echo "Archive: $dist" >$d/Release
- echo 'Component: main' >>$d/Release
- echo 'Origin: Indexdata' >>$d/Release
+ # ${confdir}/symclean.sh $d
+
+ for arch in $architectures; do
+ d=dists/$dist/$section/binary-$arch
+ if test ! -d $d; then mkdir -p $d; fi
+ echo "Archive: $dist" >$d/Release
+ echo "Component: $section" >>$d/Release
+ echo 'Origin: Indexdata' >>$d/Release
echo "Architecture: $arch" >>$d/Release
+ done
+
+ d=dists/$dist/$section/source
+ if test ! -d $d; then mkdir -p $d; fi
+ echo "Archive: $dist" >$d/Release
+ echo "Component: $section" >>$d/Release
+ echo 'Origin: Indexdata' >>$d/Release
+ echo 'Architecture: source' >>$d/Release
done
-
- d=dists/$dist/main/source
- if test ! -d $d; then mkdir -p $d; fi
- echo "Archive: $dist" >$d/Release
- echo 'Component: main' >>$d/Release
- echo 'Origin: Indexdata' >>$d/Release
- echo 'Architecture: source' >>$d/Release
-
# generate
echo "Begin Generate $dist"
F=apt-ftparchive.conf