Hello.

On Thu, Jun 18, 2015 at 04:04:57PM +0200, Johannes Schauer wrote:
> Hi,
> 
> Thanks for doing this! I only had a quick look over your diff.
[...]

Thanks for checking. Updated patch attached.

Also actually build-tested now and ran into testcase failure.
For some reason DEB_HOST_ARCH environment variable gets set to amd64
for me when building pbuilder under pbuilder which makes
"dpkg-architecture -ai386 -iamd64" return success(!), leading to
testcase failure.
To make dpkg-architecture check what is actually given on commandline
(which is what pbuilder wants), the -f flag is needed.
Added another patch for that....

Still haven't actually tested the classic satisfier yet.... TODO.

Regards,
Andreas Henriksson
>From d65a42c5b7ad8f982b5c1034dfcce5c6d42c46a7 Mon Sep 17 00:00:00 2001
From: Andreas Henriksson <[email protected]>
Date: Thu, 18 Jun 2015 12:43:53 +0200
Subject: [PATCH 4/6] Support build-profiles in classic satisfydeps

---
 pbuilder-satisfydepends-classic | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/pbuilder-satisfydepends-classic b/pbuilder-satisfydepends-classic
index 12d3107..f149b4f 100755
--- a/pbuilder-satisfydepends-classic
+++ b/pbuilder-satisfydepends-classic
@@ -45,7 +45,7 @@ split_alternates() {
 # architecture or version specifier; e.g. "/foo/(>=/2)/[i386/amd64]" becomes
 # "foo"
 get_pkg_name() {
-    echo "$*" | sed 's#^/*##; s#[[/(].*##'
+    echo "$*" | sed 's#^/*##; s#[[/(<].*##'
 }
 
 # filter operator and version of a "/" escaped versioned build-dep; e.g.
@@ -81,6 +81,13 @@ checkbuilddep_internal() {
 		continue
 	    fi
 	fi
+	if echo "$INSTALLPKG" | grep -q '<'; then
+	    if checkbuilddep_restrictiondeps "$INSTALLPKG" "$DEB_BUILD_PROFILES"; then
+		SATISFIED="yes"
+		echo "   -> This package is not for the current build profiles"
+		continue
+	    fi
+	fi
 	if echo "$INSTALLPKG" | grep -q '('; then
 	    #echo "Debug: $INSTALLPKG"
 	    if ! checkbuilddep_versiondeps "$CURRENTREALPKGNAME" `get_dep_op_and_ver "$INSTALLPKG"`; then
@@ -151,6 +158,13 @@ checkbuilddep_internal() {
 	      continue
 	  fi
       fi
+      if echo "$INSTALLPKG" | greq -q '<'; then
+          # this package has build-profiles-conflicts.
+          if checkbuilddep_restrictiondeps "$INSTALLPKG" "$DEB_BUILD_PROFILES"; then
+              echo "I: Ignoring other-buildprofiles"
+              continue
+          fi
+      fi
       if echo "$INSTALLPKG" | grep -q '('; then
 	  # this package has version-conflicts
 	  if ! checkbuilddep_versiondeps "$CURRENTREALPKGNAME" `get_dep_op_and_ver "$INSTALLPKG"`; then
-- 
2.1.4

>From b0c232b70b8954422de47584ca9f4439db7d4ec5 Mon Sep 17 00:00:00 2001
From: Andreas Henriksson <[email protected]>
Date: Thu, 18 Jun 2015 15:20:38 +0200
Subject: [PATCH 5/6] Force dpkg-architecture to use arguments over env

We don't want magic environment variables to override what
we specified on the command line when asking dpkg-architecture
to compare architectures for us....
---
 pbuilder-satisfydepends-funcs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pbuilder-satisfydepends-funcs b/pbuilder-satisfydepends-funcs
index 30d487b..fb8ac95 100755
--- a/pbuilder-satisfydepends-funcs
+++ b/pbuilder-satisfydepends-funcs
@@ -193,11 +193,11 @@ checkbuilddep_archdeps() {
     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
+            if dpkg-architecture -a$ARCH -i$d -f; then
                 IGNORE_IT="yes"
             fi
         else
-            if dpkg-architecture -a$ARCH -i$d; then
+            if dpkg-architecture -a$ARCH -i$d -f; then
                 USE_IT="yes"
             fi
             INCLUDE="yes"
-- 
2.1.4

Reply via email to