Control: tag -1 patch

Forgot the patch. Now attached.
Description: handle-native-arch-qualifiers-in-build-deps
 sbuild turns build dependencies into the dependencies of a dummy binary
 package. Since binary package dependencies do not support the :native
 architecture qualifier, these have to either be removed during native
 compilation or replaced by the build (native) architecture during cross
 building
Author: Johannes Schauer <j.scha...@email.de>

--- sbuild-0.65.0.orig/lib/Sbuild/ResolverBase.pm
+++ sbuild-0.65.0/lib/Sbuild/ResolverBase.pm
@@ -842,6 +842,25 @@ EOF
 			      reduce_profiles => 1,
 			      build_profiles => [ split / /, $self->get('Build Profiles') ]);
 
+    # sbuild turns build dependencies into the dependencies of a dummy binary
+    # package. Since binary package dependencies do not support :native the
+    # architecture qualifier, these have to either be removed during native
+    # compilation or replaced by the build (native) architecture during cross
+    # building
+    my $handle_native_archqual = sub {
+        my ($dep) = @_;
+        if ($dep->{archqual} && $dep->{archqual} eq "native") {
+            if ($self->get('Host Arch') eq $self->get('Build Arch')) {
+                $dep->{archqual} = undef;
+            } else {
+                $dep->{archqual} = $self->get('Build Arch');
+            }
+        }
+        return 1;
+    };
+    deps_iterate($positive, $handle_native_archqual);
+    deps_iterate($negative, $handle_native_archqual);
+
     $self->log("Merged Build-Depends: $positive\n") if $positive;
     $self->log("Merged Build-Conflicts: $negative\n") if $negative;
 

Attachment: signature.asc
Description: signature

Reply via email to