From 382834391ba82f745024a2cdbb66cf8edfbfd12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Mon, 4 Jan 2010 23:55:50 +0100 Subject: Normalize output of get_build_deps(), _conflicts() --- pbuilder-satisfydepends-funcs | 14 ++++++++++---- test_pbuilder-satisfydepends-funcs | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs index 5c43e34..78fb683 100755 --- a/pbuilder-satisfydepends-funcs +++ b/pbuilder-satisfydepends-funcs @@ -85,17 +85,23 @@ p' \ } get_build_deps() { - get_source_control_field "Build-Depends" + local output + + output="`get_source_control_field "Build-Depends"`" if [ "$BINARY_ARCH" = no ]; then - get_source_control_field "Build-Depends-Indep" + output="${output:+$output, }`get_source_control_field "Build-Depends-Indep"`" fi + echo "$output" } get_build_conflicts() { - get_control_field "Build-Conflicts" + local output + + output="`get_control_field "Build-Conflicts"`" if [ "$BINARY_ARCH" = no ]; then - get_source_control_field "Build-Conflicts-Indep" + output="${output:+$output, }`get_source_control_field "Build-Conflicts-Indep"`" fi + echo "$output" } checkbuilddep_archdeps() { diff --git a/test_pbuilder-satisfydepends-funcs b/test_pbuilder-satisfydepends-funcs index 479c1ff..0552ec2 100755 --- a/test_pbuilder-satisfydepends-funcs +++ b/test_pbuilder-satisfydepends-funcs @@ -45,8 +45,7 @@ trap cleanup sigpipe sighup exit # TODO move to build dir DEBIAN_CONTROL="$(tempfile)" -expect_output "autotools-dev (>= 1.2), debhelper, quilt (<< 12:0), libwxgtk2.8-dev -test, test1, test2, test3 | test4, test5" \ +expect_output "autotools-dev (>= 1.2), debhelper, quilt (<< 12:0), libwxgtk2.8-dev, test, test1, test2, test3 | test4, test5" \ test_get_build_deps "no" expect_output "autotools-dev (>= 1.2), debhelper, quilt (<< 12:0), libwxgtk2.8-dev" \ test_get_build_deps "yes" -- cgit v1.2.3