aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2010-01-05 00:01:25 +0100
committerLoïc Minier <lool@dooz.org>2010-01-05 00:01:25 +0100
commit451ead17ded7acd2a0c530bb9d64ac669e2ed5b0 (patch)
tree89446e3ca8ad4aefc0c26850a029fee1688d3beb
parent382834391ba82f745024a2cdbb66cf8edfbfd12d (diff)
downloadpbuilder-451ead17ded7acd2a0c530bb9d64ac669e2ed5b0.tar
pbuilder-451ead17ded7acd2a0c530bb9d64ac669e2ed5b0.tar.gz
Normalize and test arch specifiers
-rwxr-xr-xpbuilder-satisfydepends-funcs5
-rwxr-xr-xtest_pbuilder-satisfydepends-funcs6
2 files changed, 8 insertions, 3 deletions
diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index 78fb683..9627430 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -75,6 +75,11 @@ s/ *| */ | /g
# normalize space before and after parentheses
s/ *( */ (/g
s/ *) */)/g
+# normalize space before and after brackets
+s/ *\[ */ [/g
+s/ *\] */]/g
+# normalize space after exclamation mark
+s/! */!/g
# normalize space between operator and version
s/(\(>>\|>=\|>\|==\|=\|<=\|<<\|<\|!=\) *\([^)]*\))/(\1 \2)/g
# normalize space at beginning and end of line
diff --git a/test_pbuilder-satisfydepends-funcs b/test_pbuilder-satisfydepends-funcs
index 0552ec2..b713f56 100755
--- a/test_pbuilder-satisfydepends-funcs
+++ b/test_pbuilder-satisfydepends-funcs
@@ -27,8 +27,8 @@ Build-Depends:
quilt(<<12:0),
##
libwxgtk2.8-dev
-Build-Depends-Indep: test, test1,
- test2, test3 |
+Build-Depends-Indep: test [ amd64 i386 ], test1,
+ test2[!i386 ! amd64], test3 |
test4, test5
Misc: test
@@ -45,7 +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 [amd64 i386], test1, test2 [!i386 !amd64], 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"