1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Always create apt-ftparchive.conf.

The Releases file(s) and other bits for EOL-ed distros such as Ubuntu
Vivid should remain untouched when we are releasing debs.

However, few files in https://apt.dockerproject.org/repo/dists/ubuntu-vivid/
were being updated for the docker 1.10 release including the Release files.
This is due to apt-ftparchive generating index files for vivid as well,
due to the stale apt-ftparchive.conf

This change always creates config using suites in contrib/reprepro/suites.sh.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
(cherry picked from commit 204c7808f9)
This commit is contained in:
Anusha Ragunathan 2016-02-23 15:22:03 -08:00 committed by Tibor Vass
parent 11a8469e49
commit 97e7e233b6

View file

@ -47,21 +47,22 @@ if [[ ! "${components[*]}" =~ $component ]] ; then
components+=( $component ) components+=( $component )
fi fi
# create/update apt-ftparchive file # create apt-ftparchive file on every run. This is essential to avoid
if [ ! -f "$APTDIR/conf/apt-ftparchive.conf" ]; then # using stale versions of the config file that could cause unnecessary
cat <<-EOF > "$APTDIR/conf/apt-ftparchive.conf" # refreshing of bits for EOL-ed releases.
Dir { cat <<-EOF > "$APTDIR/conf/apt-ftparchive.conf"
Dir {
ArchiveDir "${APTDIR}"; ArchiveDir "${APTDIR}";
CacheDir "${APTDIR}/db"; CacheDir "${APTDIR}/db";
}; };
Default { Default {
Packages::Compress ". gzip bzip2"; Packages::Compress ". gzip bzip2";
Sources::Compress ". gzip bzip2"; Sources::Compress ". gzip bzip2";
Contents::Compress ". gzip bzip2"; Contents::Compress ". gzip bzip2";
}; };
TreeDefault { TreeDefault {
BinCacheDB "packages-\$(SECTION)-\$(ARCH).db"; BinCacheDB "packages-\$(SECTION)-\$(ARCH).db";
Directory "pool/\$(SECTION)"; Directory "pool/\$(SECTION)";
Packages "\$(DIST)/\$(SECTION)/binary-\$(ARCH)/Packages"; Packages "\$(DIST)/\$(SECTION)/binary-\$(ARCH)/Packages";
@ -69,10 +70,10 @@ if [ ! -f "$APTDIR/conf/apt-ftparchive.conf" ]; then
Sources "\$(DIST)/\$(SECTION)/source/Sources"; Sources "\$(DIST)/\$(SECTION)/source/Sources";
Contents "\$(DIST)/\$(SECTION)/Contents-\$(ARCH)"; Contents "\$(DIST)/\$(SECTION)/Contents-\$(ARCH)";
FileList "$APTDIR/\$(DIST)/\$(SECTION)/filelist"; FileList "$APTDIR/\$(DIST)/\$(SECTION)/filelist";
}; };
EOF EOF
for suite in $(exec contrib/reprepro/suites.sh); do for suite in $(exec contrib/reprepro/suites.sh); do
cat <<-EOF cat <<-EOF
Tree "dists/${suite}" { Tree "dists/${suite}" {
Sections "${components[*]}"; Sections "${components[*]}";
@ -80,8 +81,7 @@ if [ ! -f "$APTDIR/conf/apt-ftparchive.conf" ]; then
} }
EOF EOF
done >> "$APTDIR/conf/apt-ftparchive.conf" done >> "$APTDIR/conf/apt-ftparchive.conf"
fi
if [ ! -f "$APTDIR/conf/docker-engine-release.conf" ]; then if [ ! -f "$APTDIR/conf/docker-engine-release.conf" ]; then
cat <<-EOF > "$APTDIR/conf/docker-engine-release.conf" cat <<-EOF > "$APTDIR/conf/docker-engine-release.conf"