aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-satisfydepends-funcs
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2011-02-19 19:29:19 +0000
committerJunichi Uekawa <dancer@netfort.gr.jp>2011-06-24 19:32:19 +0900
commitb82c625202cbb0a46f47bb4eb7c25eac8eb8bb54 (patch)
tree657e34131a99a2c03b007f6df9061111b330914e /pbuilder-satisfydepends-funcs
parentb8ba16bbb5354d65c6857df64b8488578ca648f7 (diff)
downloadpbuilder-b82c625202cbb0a46f47bb4eb7c25eac8eb8bb54.tar
pbuilder-b82c625202cbb0a46f47bb4eb7c25eac8eb8bb54.tar.gz
Bug#606699: pbuilder NMU
Hi, I talked to Junichi and he told me it was fine if I NMU'ed pbuilder to fix these bugs. This is the debdiff for my NMU. Regards, Emilio
Diffstat (limited to 'pbuilder-satisfydepends-funcs')
-rwxr-xr-xpbuilder-satisfydepends-funcs35
1 files changed, 24 insertions, 11 deletions
diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index f4cae2d..64436a0 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -123,19 +123,32 @@ checkbuilddep_archdeps() {
local ARCH="$2"
# architectures listed between [ and ] for this dep
local DEP_ARCHES="$(echo "$INSTALLPKG" | sed 's/.*\[\(.*\)\].*/\1/')"
- # check for !$ARCH in DEP_ARCHES
- if echo "$DEP_ARCHES" | egrep -q "(^|[[:space:]/]+)\![[:space:]/]*$ARCH($|[[:space:]/]+)"; then
- return 0;
+ local PKG="$(echo "$INSTALLPKG" | cut -d ' ' -f 1)"
+ local USE_IT
+ local IGNORE_IT
+ local INCLUDE
+ # Use 'dpkg-architecture' to support architecture wildcards.
+ for d in $DEP_ARCHES; do
+ if echo "$d" | grep -q '!'; then
+ d="$(echo $d | sed 's/!//')"
+ if dpkg-architecture -a$ARCH -i$d; then
+ IGNORE_IT="yes"
+ fi
+ else
+ if dpkg-architecture -a$ARCH -i$d; then
+ USE_IT="yes"
+ fi
+ INCLUDE="yes"
+ fi
+ done
+ if [ $IGNORE_IT ] && [ $USE_IT ]; then
+ printf "W: inconsistent arch restriction on $PKG: " >&2
+ printf "$DEP_ARCHES depedency\n" >&2
fi
- # check for a "!" which would mean there's a !<otherarch> and hence $ARCH
- # 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
- return 0;
- fi
+ if [ $IGNORE_IT ] || ( [ $INCLUDE ] && [ ! $USE_IT ] ); then
+ return 0
fi
- return 1;
+ return 1
}
checkbuilddep_provides() {