From b068c8d3289423f7d74a7f8d5886830777d71c27 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Date: Thu, 28 May 2015 12:25:06 +0200 Subject: move filter_arch_deps from pbuilder-satisfydepends-aptitude to pbuilder-satisfydepends-funcs and add tests --- pbuilder-satisfydepends-aptitude | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'pbuilder-satisfydepends-aptitude') diff --git a/pbuilder-satisfydepends-aptitude b/pbuilder-satisfydepends-aptitude index 97c58e5..31f5353 100755 --- a/pbuilder-satisfydepends-aptitude +++ b/pbuilder-satisfydepends-aptitude @@ -25,38 +25,6 @@ export PBUILDER_PKGLIBDIR="${PBUILDER_PKGLIBDIR:-$PBUILDER_ROOT/usr/lib/pbuilder . "$PBUILDER_PKGLIBDIR"/pbuilder-satisfydepends-funcs - -# filter out dependencies sent on input not for this arch; deps can have -# multiple lines; output is on a single line or "" if empty -function filter_arch_deps() { - local arch="$1" - local INSTALLPKGMULTI - local INSTALLPKG - - # split on "," - sed 's/[[:space:]]*,[[:space:]]*/\n/g' | - while read INSTALLPKGMULTI; do - echo "$INSTALLPKGMULTI" | - # split on "|" - sed 's/[[:space:]]*|[[:space:]]*/\n/g' | - while read INSTALLPKG; do - if echo "$INSTALLPKG" | grep -q '\['; then - if checkbuilddep_archdeps "$INSTALLPKG" "$ARCH"; then - continue - fi - fi - # output the selected package - echo "$INSTALLPKG" - done | - # remove the arch list and add " | " between entries - sed 's/\[.*\]//; $,$! s/$/ |/' | - xargs --no-run-if-empty - done | - # add ", " between entries - sed '$,$! s/$/,/' | - xargs --no-run-if-empty -} - function checkbuilddep_internal () { # Use this function to fulfill the dependency (almost) local ARCH=$($CHROOTEXEC dpkg-architecture -qDEB_HOST_ARCH) -- cgit v1.2.3