From 467283eb514f79968c3002bbfd1b7b01cff1291e Mon Sep 17 00:00:00 2001 From: Loïc Minier Date: Mon, 25 Jan 2010 13:27:18 +0100 Subject: Add support for pockets in suite mode and tests --- pbuilder-apt-config | 4 ++++ test_pbuilder-apt-config | 26 ++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/pbuilder-apt-config b/pbuilder-apt-config index 57c9d4a..1a56780 100755 --- a/pbuilder-apt-config +++ b/pbuilder-apt-config @@ -253,6 +253,7 @@ if [ -n "$profile" ]; then if [ "$base_dist" != "${profile%%-*}" ]; then die "Unknown Ubuntu based profile=$profile" fi + pockets="" case "$profile" in *-backports) pockets="updates backports" @@ -289,6 +290,9 @@ if [ -n "$suite" ]; then mirror="`guess_vendor_arch_mirror "$vendor" "$arch"`" fi output_sources "$with_sources" "$mirror" "$suite" "$components" + for pocket in $pockets; do + output_sources "$with_sources" "$mirror" "$suite-$pocket" "$components" + done exit 0 fi diff --git a/test_pbuilder-apt-config b/test_pbuilder-apt-config index b6c8ff8..6b35ee1 100755 --- a/test_pbuilder-apt-config +++ b/test_pbuilder-apt-config @@ -12,6 +12,16 @@ test_components() { run_suite_mode --components "comp1 comp2 comp3" } +test_pockets() { + run_suite_mode --pockets "" + echo + run_suite_mode --pockets pocket1 + echo + run_suite_mode --pockets pocket1,pocket2,pocket3 + echo + run_suite_mode --pockets "pocket1 pocket2 pocket3" +} + strip_mirror() { local deb mirror eol @@ -40,6 +50,21 @@ expect_output "deb mirror suite comp1 deb mirror suite comp1 comp2 comp3 deb mirror suite comp1 comp2 comp3" test_components +expect_output "deb mirror suite component + +deb mirror suite component +deb mirror suite-pocket1 component + +deb mirror suite component +deb mirror suite-pocket1 component +deb mirror suite-pocket2 component +deb mirror suite-pocket3 component + +deb mirror suite component +deb mirror suite-pocket1 component +deb mirror suite-pocket2 component +deb mirror suite-pocket3 component" test_pockets + expect_output "deb unstable comp1" test_profile unstable expect_output "deb sid comp1" test_profile sid expect_output "deb unstable comp1 @@ -53,6 +78,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 lucid comp1" test_profile lucid expect_output "deb lucid comp1 deb lucid-updates comp1 -- cgit v1.2.3