diff options
author | dancer <dancer> | 2006-05-15 12:46:56 +0000 |
---|---|---|
committer | dancer <dancer> | 2006-05-15 12:46:56 +0000 |
commit | 61b7ce9a47bb2937bfc68e0cbc1591158e846617 (patch) | |
tree | 1f7ad3d474b48607da082dcd9db7d911441ac60d /pbuilder-satisfydepends | |
parent | 6dee61ea8597c198b3dfd642103022b034ce774a (diff) | |
download | pbuilder-61b7ce9a47bb2937bfc68e0cbc1591158e846617.tar pbuilder-61b7ce9a47bb2937bfc68e0cbc1591158e846617.tar.gz |
* Support for new style architecture specifications (closes: #363193)
Thanks to Peter Eisentraut for patch.
Diffstat (limited to 'pbuilder-satisfydepends')
-rw-r--r-- | pbuilder-satisfydepends | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/pbuilder-satisfydepends b/pbuilder-satisfydepends index 92c1389..93b9a06 100644 --- a/pbuilder-satisfydepends +++ b/pbuilder-satisfydepends @@ -40,16 +40,29 @@ function checkbuilddep_versiondeps () { return 1; } +function expand_arch () { + local ARCH="$1" + local EXPANDED_ARCH + if echo "$ARCH" | grep "-" > /dev/null; then + EXPANDED_ARCH=$ARCH + else + EXPANDED_ARCH="linux-$ARCH" + fi + local WC1=$(echo $EXPANDED_ARCH | sed 's/^[^-]*/any/') + local WC2=$(echo $EXPANDED_ARCH | sed 's/[^-]*$/any/') + echo "$ARCH\\|$EXPANDED_ARCH\\|$WC1\\|$WC2" +} + 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 echo "$INSTALLPKG" | sed 's/.*\(\[.*\]\)/\1/' | grep "[[/][!]\($(expand_arch $ARCH)\)[]/]" > /dev/null; then # if !$ARCH exists in there, ERROR. 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 ! echo "$INSTALLPKG" | sed 's/.*\(\[.*\]\)/\1/' | grep "[[/]\($(expand_arch $ARCH)\)[]/]" > /dev/null; then # if $ARCH does not exist, ERROR. return 0; fi |