From b4af4884af4d8e6224f70fc89fdafbfc44e82a89 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Fri, 28 Sep 2012 09:05:31 -0500 Subject: [PATCH] j/seeds/debian: support a sane local pool layout, and legacy releases --- seeds/debian.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/seeds/debian.sh b/seeds/debian.sh index e3804c6..5e2be35 100644 --- a/seeds/debian.sh +++ b/seeds/debian.sh @@ -23,20 +23,27 @@ esac [ "${repo}" ] || { if [ -f "${jseed}/debian/dists/${suite}/Release" ] then + echo "Using local ${suite} pool for installation" >&2 repo="file://${jseed}/debian" else - repo="http://archive.debian.org/debian" + case "${suite}" in + buzz|rex|bo|hamm|slink|potato|woody|sarge|etch|lenny) + repo="http://archive.debian.org/debian" ;; + squeeze|wheezy|sid|*) + repo="http://ftp.debian.org/debian" ;; + esac + echo "Using site '${repo}' for installation" >&2 fi } keyring="${jseed}/debian/debian-archive-keyring.gpg" [ -f "${keyring}" ] || unset keyring -mkdir -p "${jroot}/var/cache/apt/archives" -[ ! -d "${jseed}/debian/debs" ] || { - echo "Seeding deb archives" >&2 - ( cd "${jseed}/debian/debs"; find . | cpio -pl "${jroot}/var/cache/apt/archives" ) +[ ! -d "${jseed}/debian/pool" ] || { + echo "Seeding deb archives from local pool" >&2 + mkdir -p "${jroot}/var/cache/apt/archives" + find "${jseed}/debian/pool" -name '*.deb' -exec cp -l {} "${jroot}/var/cache/apt/archives" \; } cmd="debootstrap '--arch=${arch}' ${keyring+'--keyring=${jseed}/debian/debian-archive-keyring.gpg'} '--include=${include}' '${suite}' '${jroot}' '${repo}'" -- 2.42.0