aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-satisfydepends-funcs
diff options
context:
space:
mode:
authorLoïc Minier <lool@dooz.org>2007-03-31 16:55:32 +0200
committerLoïc Minier <lool@dooz.org>2007-03-31 16:55:32 +0200
commite60c7421cdc7b48bec0f67a0a21cdbc7325bbb2e (patch)
treed9be9cabd5caaafb6103385c267511a4954bcaeb /pbuilder-satisfydepends-funcs
parent65686562c1cb38de1880cdf137cc724ce38d7862 (diff)
downloadpbuilder-e60c7421cdc7b48bec0f67a0a21cdbc7325bbb2e.tar
pbuilder-e60c7421cdc7b48bec0f67a0a21cdbc7325bbb2e.tar.gz
* Misc cleanups in checkbuilddep_archdeps().
Diffstat (limited to 'pbuilder-satisfydepends-funcs')
-rwxr-xr-xpbuilder-satisfydepends-funcs12
1 files changed, 7 insertions, 5 deletions
diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index f78e237..a59905e 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -54,13 +54,15 @@ function checkbuilddep_archdeps () {
# returns FALSE on INSTALL
local INSTALLPKG="$1"
local ARCH="$2"
- if echo "$INSTALLPKG" | sed 's/.*\(\[.*\]\)/\1/' | grep "[[/][!]\($ARCH\)[]/]" > /dev/null; then
- # if !$ARCH exists in there, ERROR.
+ # 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" | grep -q "[[/][!]\($ARCH\)[]/]"; then
return 0;
fi
- if ! echo "$INSTALLPKG" | sed 's/.*\(\[.*\]\)/\1/' | grep "[!]" > /dev/null; then
- if ! echo "$INSTALLPKG" | sed 's/.*\(\[.*\]\)/\1/' | grep "[[/]\($ARCH\)[]/]" > /dev/null; then
- # if $ARCH does not exist, ERROR.
+ if ! echo "$DEP_ARCHES" | grep "[!]" > /dev/null; then
+ # check for arch in $ARCH in DEP_ARCHES
+ if ! echo "$DEP_ARCHES" | grep "[[/]\($ARCH\)[]/]" > /dev/null; then
return 0;
fi
fi