Commit 5a595e32 authored by Loïc Minier's avatar Loïc Minier

Add support for --archive

parent ac445efb
......@@ -14,7 +14,7 @@ log() {
}
usage() {
log "$self [<options>] [--mirror=<mirror>] [--suite=<suite>] [--pockets=<pocket1>,<pocket2>] <action>"
log "$self [<options>] [--archive=<archive>] [--mirror=<mirror>] [--suite=<suite>] [--pockets=<pocket1>,<pocket2>] <action>"
log "$self [--profile=<profile>] <action>"
log " where <action> is one of apt-sources, debootstrap-mirror, or debootstrap-suite"
log
......@@ -152,13 +152,14 @@ set_debootstrap_suite() {
esac
}
getopt_output="`getopt -o "" -l help,with-sources::,arch:,components:,mirror:,suite:,pockets:,profile: -n "$self" -s sh -- "$@"`"
getopt_output="`getopt -o "" -l help,with-sources::,arch:,components:,archive:,mirror:,suite:,pockets:,profile: -n "$self" -s sh -- "$@"`"
eval set -- "$getopt_output"
with_sources="disabled"
arch="`dpkg --print-architecture`"
components="main"
archive=""
mirror=""
suite=""
pockets=""
......@@ -193,6 +194,10 @@ while :; do
components="$2"
shift 2
;;
--archive)
archive="$2"
shift 2
;;
--mirror)
mirror="$2"
shift 2
......
......@@ -119,6 +119,13 @@ expect_output "deb mirror suite component
#deb-src mirror suite component" run_suite_mode --with-sources=disabled
expect_output "deb mirror suite component" run_suite_mode --with-sources=no
expect_output "deb http://archive.ubuntu.com/ubuntu/ suite component" run_suite_mode --mirror "" --archive ubuntu
expect_output "deb http://ports.ubuntu.com/ubuntu-ports/ suite component" run_suite_mode --arch armel --mirror "" --archive ubuntu-ports
expect_fail run_suite_mode --arch armel --mirror "" --archive archive
expect_success run_suite_mode --mirror "" --suite lucid
expect_fail run_suite_mode --mirror "" --suite suite
expect_success run_suite_mode --mirror "" --suite suite --archive ubuntu
expect_output "suite" debootstrap_suite --suite suite
expect_output "sid" debootstrap_suite --suite sid
expect_output "sid" debootstrap_suite --suite unstable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment