Back to this issue. dpkg has supported the build dependency style [linux-any]
or [linux-any hurd-any] etc. since etch, so it should be safe to use it.
We were earlier confused by the unclear documentation, but
dpkg-architecture(1) now has nice examples:
Check if the current architecture or an architecture provided with -a
are Linux systems:
dpkg-architecture -ilinux-any
dpkg-architecture -ai386 -ilinux-any
With that in mind, I propose the attached patch. It looks simple enough.
Apparently the old regular expression supports architectures separated by
slashes (/)? I don't find this documented anywhere, but you can continue to
support that if you split up $DEP_ARCHES beforehand.
As a test case, I used pgpool, replaced libpam-dev by libpam-dev [linux-any
hurd-any] and could build successfully. Yay! :)
--- tmp/pbuilder-0.178/pbuilder-satisfydepends-funcs 2007-04-02 01:41:31.000000000 +0200
+++ /usr/lib/pbuilder/pbuilder-satisfydepends-funcs 2008-03-31 14:28:22.000000000 +0200
@@ -79,7 +79,15 @@
# is included
if ! echo "$DEP_ARCHES" | grep -q '!'; then
# check for $ARCH in DEP_ARCHES
- if ! echo "$DEP_ARCHES" | egrep -q "(^|[[:space:]/]+)$ARCH($|[[:space:]/]+)"; then
+ local match=no
+ local d
+ for d in $DEP_ARCHES; do
+ if dpkg-architecture -a$ARCH -i$d; then
+ match=yes
+ break
+ fi
+ done
+ if [ "$match" = no ]; then
return 0;
fi
fi