diff options
-rwxr-xr-x | pbuilder-apt-config | 14 | ||||
-rwxr-xr-x | test_pbuilder-apt-config | 1 |
2 files changed, 12 insertions, 3 deletions
diff --git a/pbuilder-apt-config b/pbuilder-apt-config index 307e0ad..b464b3e 100755 --- a/pbuilder-apt-config +++ b/pbuilder-apt-config @@ -8,7 +8,6 @@ self="$(basename "$0")" # TODO # - support setting --mirror-map (for --profile) # - Debian security entries? -# - oldstable log() { echo "$@" >&2 @@ -35,9 +34,12 @@ guess_dist_arch_archive() { local arch="$2" case "$dist" in - etch|lenny|squeeze|sid|testing|unstable|experimental) + etch|lenny|squeeze|sid|oldstable|stable|testing|unstable|experimental) echo "debian" ;; + buzz|rex|bo|hamm|slink|potato|woody|sarge|etch|lenny|squeeze) + echo "debian-archive" + ;; hardy|intrepid|jaunty|karmic|lucid) case "$arch" in amd64|i386) @@ -67,6 +69,9 @@ get_archive_url() { debian) echo "http://ftp.us.debian.org/debian/" ;; + debian-archive) + echo "http://archive.debian.org/debian/" + ;; ubuntu) echo "http://archive.ubuntu.com/ubuntu/" ;; @@ -133,6 +138,9 @@ set_debootstrap_suite() { stable) debootstrap_suite="lenny" ;; + oldstable) + debootstrap_suite="etch" + ;; *) debootstrap_suite="$suite" ;; @@ -236,7 +244,7 @@ if [ -n "$profile" ]; then base_archive="`guess_dist_arch_archive "$base_dist" "$arch"`" base_mirror="`get_archive_url "$base_archive"`" case "$base_archive" in - debian) + debian|debian-archive) case "$profile" in experimental) base_dist="unstable" diff --git a/test_pbuilder-apt-config b/test_pbuilder-apt-config index a9a6392..b90aea8 100755 --- a/test_pbuilder-apt-config +++ b/test_pbuilder-apt-config @@ -91,6 +91,7 @@ deb squeeze/volatile comp1" test_profile squeeze/volatile expect_output "deb squeeze comp1 deb squeeze/volatile comp1 deb squeeze/volatile-sloppy comp1" test_profile squeeze/volatile-sloppy +expect_output "deb bo comp1" test_profile bo expect_output "deb lucid comp1" test_profile lucid expect_output "deb lucid comp1 |