From d218abaa8e93a963eef1239a8375639618ab68c8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 17 Feb 2014 16:56:46 +0100 Subject: [PATCH] Use local approx cache on buildhost. --- debian/changelog | 6 ++++++ debian/postinst | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3759613..eb64fda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pgdg-buildenv (12) sid-pgdg; urgency=medium + + * Use local approx cache on buildhost. + + -- Christoph Berg Mon, 17 Feb 2014 16:56:24 +0100 + pgdg-buildenv (11) sid-pgdg; urgency=medium * Add logrotate. diff --git a/debian/postinst b/debian/postinst index ac3aa6a..58d3af6 100644 --- a/debian/postinst +++ b/debian/postinst @@ -10,10 +10,18 @@ case $1 in # update sources.list dist=$(lsb_release -cs) + mirror="http://apt.postgresql.org/pub/repos/apt/" + mirror_testing="http://atalia.postgresql.org/pub/repos/apt/" + case $(hostname) in + pgdg*) # use local cache on build host + mirror="http://atalia-approx:9999/atalia" + mirror_testing="$mirror" + ;; + esac cat > /etc/apt/sources.list.d/pgdg.list <<-EOF # do not edit, file maintained by pgdg-buildenv - deb http://apt.postgresql.org/pub/repos/apt/ $dist-pgdg main - deb http://atalia.postgresql.org/pub/repos/apt/ $dist-pgdg-testing main + deb $mirror $dist-pgdg main + deb $mirror_testing $dist-pgdg-testing main EOF # remove existing apt translations so apt does not try to refresh them -- 2.39.5