# Uncomment to clean the .db (cache)
# rm tmp/*
+ sections=""
for section in main restricted; do
# Prepare pool
d=pool/dists/$dist/$section
fi
done
# Make symlinks from the regular FTP archive
+ has_packages=false
for pdir in /home/ftp/pub/*; do
use=false
if test -f $pdir/.htaccess -a $section != "main"; then
$distdir/*_all.*; do
if test -f $f; then
ln -sf $f $d/${arch}
+ has_packages=true
fi
done
done
fi
done
# ${confdir}/symclean.sh $d
-
- for arch in $architectures; do
- d=dists/$dist/$section/binary-$arch
+
+ rm -f $d/Release
+ if $has_packages; then
+ if test -z "$sections"; then
+ sections="$section"
+ else
+ sections="$sections $section"
+ fi
+ 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: $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
+ echo 'Architecture: source' >>$d/Release
+ fi
done
# generate
- echo "Begin Generate $dist"
+ echo "Begin Generate $dist: $sections"
F=apt-ftparchive.conf
- sed "s/@dist@/$dist/g" <${confdir}/${F}.in |sed "s/@architectures@/${architectures}/g" > $F
+ sed "s/@dist@/$dist/g" <${confdir}/${F}.in | \
+ sed "s/@architectures@/${architectures}/g" | \
+ sed "s/@sections@/${sections}/g" > $F
# Don't know if clean is needed!
# apt-ftparchive clean apt-ftparchive.conf
apt-ftparchive generate apt-ftparchive.conf
- echo "Done generate $dist"
+ echo "Done generate $dist: $sections"
# release
r=dists/$dist/Release
F=apt-release.conf
- sed "s/@dist@/$dist/g" <${confdir}/${F}.in | sed "s/@architectures@/${architectures}/g" >$F
+ sed "s/@dist@/$dist/g" <${confdir}/${F}.in | \
+ sed "s/@architectures@/${architectures}/g" | \
+ sed "s/@sections@/${sections}/g" > $F
# Move Release file away while calling using release
rm $r
apt-ftparchive -c $F release dists/$dist >tmp_Release