From 8a262cc2a5e3cf5a38049ebccb0680f8d4f0e6ee Mon Sep 17 00:00:00 2001 From: Don Armstrong <don@donarmstrong.com> Date: Tue, 17 Mar 2009 00:18:49 +0000 Subject: [PATCH] switch build_archive to use databases and other features of apt-ftparchive --- build_archive | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/build_archive b/build_archive index 1009eb9..e2f092b 100755 --- a/build_archive +++ b/build_archive @@ -1,4 +1,13 @@ #!/bin/sh + +ORIGIN=donarmstrong +LABEL=donarmstrong +ARCHITECTURES="all i386 amd64 powerpc" + +if [ -e .build_archive.conf ]; then + .build_archive.conf +fi; + if [ ! -e Release ]; then cat - <<EOF > Release Origin: donarmstrong @@ -6,4 +15,16 @@ Label: donarmstrong Architectures: all i386 EOF fi; -apt-ftparchive packages . |gzip -c > Packages.gz \ No newline at end of file +apt-ftparchive -qq --db apt_ftparchive.db --contents packages . > Packages; +apt-ftparchive -qq --db apt_ftparchive.db sources . > Sources; +apt-ftparchive -qq --db apt_ftparchive.db contents . > Contents; +apt-ftparchive -qq --db apt_ftparchive.db \ + -o APT::FTPArchive::Release::Origin="$ORIGIN" \ + -o APT::FTPArchive::Release::Label="$LABEL" \ + -o APT::FTPArchive::Release::Architectures="$ARCHITECTURES" \ + release . > Release; + +for file in Sources Packages Contents; do + gzip -c $file > ${file}.gz + bzip2 -c $file > ${file}.bz2 +done; \ No newline at end of file -- 2.39.5