Hi,

the correct solution according to apt maintainers is to set Apt::Architectures
in addition to Apt::Architecture. Patch is attached.

In the future, it could be a useful option to also be able to set
Apt::Architectures to include foreign architectures in the apt tree.

Thanks!

cheers, josch
From 8f97dec9e7e7321bbb6de27c552adc83cd3efe4d Mon Sep 17 00:00:00 2001
From: josch <[email protected]>
Date: Tue, 6 Jan 2015 13:16:52 +0100
Subject: [PATCH] scripts/chdist.pl: also set Apt::Architectures

 - to prevent foreign arches to leak into the apt tree
---
 debian/changelog  | 4 ++++
 scripts/chdist.pl | 2 ++
 2 files changed, 6 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 2b9e08f..3ed1251 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,10 @@ devscripts (2.15.1+exp1) UNRELEASED; urgency=medium
   * debsnap: When specified version or architectures aren't available, warn
     and exit with error code 2.  (Closes: #774276)
 
+  [ Johannes Schauer ]
+  * chdist: Also set Apt::Architectures to prevent foreign architectures from
+    the host leaking into the apt tree (Closes: #774685)
+
  -- James McCoy <[email protected]>  Sat, 03 Jan 2015 00:47:36 -0500
 
 devscripts (2.15.1) unstable; urgency=medium
diff --git a/scripts/chdist.pl b/scripts/chdist.pl
index 11e03e4..320bea8 100755
--- a/scripts/chdist.pl
+++ b/scripts/chdist.pl
@@ -237,6 +237,7 @@ sub aptopts
     if ($arch) {
 	print "W: Forcing arch $arch for this command only.\n";
 	push(@opts, '-o', "Apt::Architecture=$arch");
+	push(@opts, '-o', "Apt::Architectures=$arch");
     }
     return @opts;
 }
@@ -374,6 +375,7 @@ EOF
     print FH <<EOF;
 Apt {
    Architecture "$arch";
+   Architectures "$arch";
 };
 
 Dir "$dir";
-- 
2.0.1

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to