]> git.saurik.com Git - apt.git/commitdiff
For cross-build-dependencies, Architecture: all packages should be
authorSteve Langasek <steve.langasek@canonical.com>
Fri, 6 Apr 2012 00:59:37 +0000 (17:59 -0700)
committerSteve Langasek <steve.langasek@canonical.com>
Fri, 6 Apr 2012 00:59:37 +0000 (17:59 -0700)
treated as implicitly Multi-Arch: foreign, because either they *are*
M-A: foreign when used as a build-dependency, or they need to be updated
to not be Architecture: all; and since cross-build-deps are new
functionality in apt, we can safely make this change without breaking
existing systems.  Closes: #666772.

cmdline/apt-get.cc
debian/changelog
test/integration/test-bug-666772-multiarch-arch-all-build-deps [new file with mode: 0755]

index 45405e7613f3dae730db36618c1c1a47bf4e8897..7c7e94eba004608dd3fe9b0b49e2bb461fc0ab1e 100644 (file)
@@ -2863,7 +2863,7 @@ bool DoBuildDep(CommandLine &CmdL)
               if ((BADVER(Ver)) == false)
               {
                  string forbidden;
               if ((BADVER(Ver)) == false)
               {
                  string forbidden;
-                 if (Ver->MultiArch == pkgCache::Version::None || Ver->MultiArch == pkgCache::Version::All)
+                 if (Ver->MultiArch == pkgCache::Version::None)
                  {
                     if (colon == string::npos)
                     {
                  {
                     if (colon == string::npos)
                     {
@@ -2878,7 +2878,7 @@ bool DoBuildDep(CommandLine &CmdL)
                        forbidden = "Multi-Arch: same";
                     // :native gets the buildArch
                  }
                        forbidden = "Multi-Arch: same";
                     // :native gets the buildArch
                  }
-                 else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign)
+                 else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign || Ver->MultiArch == pkgCache::Version::All)
                  {
                     if (colon != string::npos)
                        forbidden = "Multi-Arch: foreign";
                  {
                     if (colon != string::npos)
                        forbidden = "Multi-Arch: foreign";
index cab53d034e5931a53b500059a8612b2a94d2bac3..36ded851d50a12300c77832fd7d7fdef6df969ec 100644 (file)
@@ -9,6 +9,12 @@ apt (0.8.16~exp12ubuntu7) UNRELEASED; urgency=low
     change at build time, since this makes translations fail to be
     co-installable with multiarch.  Based on a patch by David Kalnischkies.
     Closes: #659333, LP: #924628.
     change at build time, since this makes translations fail to be
     co-installable with multiarch.  Based on a patch by David Kalnischkies.
     Closes: #659333, LP: #924628.
+  * For cross-build-dependencies, Architecture: all packages should be
+    treated as implicitly Multi-Arch: foreign, because either they *are*
+    M-A: foreign when used as a build-dependency, or they need to be updated
+    to not be Architecture: all; and since cross-build-deps are new
+    functionality in apt, we can safely make this change without breaking
+    existing systems.  Closes: #666772.
 
  -- Steve Langasek <steve.langasek@ubuntu.com>  Sat, 24 Mar 2012 00:05:43 -0700
 
 
  -- Steve Langasek <steve.langasek@ubuntu.com>  Sat, 24 Mar 2012 00:05:43 -0700
 
diff --git a/test/integration/test-bug-666772-multiarch-arch-all-build-deps b/test/integration/test-bug-666772-multiarch-arch-all-build-deps
new file mode 100755 (executable)
index 0000000..cfae1fe
--- /dev/null
@@ -0,0 +1,118 @@
+#!/bin/sh
+set -e
+
+TESTDIR=$(readlink -f $(dirname $0))
+. $TESTDIR/framework
+setupenvironment
+configarchitecture 'amd64' 'armhf'
+
+insertinstalledpackage 'build-essential' 'all' '11.5'
+
+insertpackage 'unstable' 'doxygen' 'all' '1.0' 'Depends: language-support, language-tool'
+insertpackage 'unstable' 'libc6' 'amd64,armhf' '1.0' 'Multi-Arch: same'
+insertpackage 'unstable' 'libc6-dev' 'amd64,armhf' '1.0' 'Depends: libc6
+Multi-Arch: same'
+insertpackage 'unstable' 'language-support' 'amd64,armhf' '1.0' 'Multi-Arch: foreign'
+insertpackage 'unstable' 'language-tool' 'amd64,armhf' '1.0'
+
+insertsource 'unstable' 'apt' 'any' '0.8.15' 'Build-Depends: doxygen, libc6-dev'
+
+setupaptarchive
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  doxygen language-support language-tool libc6 libc6-dev
+0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
+Inst language-support (1.0 unstable [amd64])
+Inst language-tool (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [all])
+Inst libc6 (1.0 unstable [amd64])
+Inst libc6-dev (1.0 unstable [amd64])
+Conf language-support (1.0 unstable [amd64])
+Conf language-tool (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [all])
+Conf libc6 (1.0 unstable [amd64])
+Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  doxygen language-support language-tool libc6:armhf libc6-dev:armhf
+0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
+Inst language-support (1.0 unstable [amd64])
+Inst language-tool (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [all])
+Inst libc6:armhf (1.0 unstable [armhf])
+Inst libc6-dev:armhf (1.0 unstable [armhf])
+Conf language-support (1.0 unstable [amd64])
+Conf language-tool (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [all])
+Conf libc6:armhf (1.0 unstable [armhf])
+Conf libc6-dev:armhf (1.0 unstable [armhf])' aptget build-dep apt -s -a armhf
+
+configarchitecture 'armhf' 'amd64'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  doxygen language-support language-tool libc6 libc6-dev
+0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
+Inst language-support (1.0 unstable [armhf])
+Inst language-tool (1.0 unstable [armhf])
+Inst doxygen (1.0 unstable [all])
+Inst libc6 (1.0 unstable [armhf])
+Inst libc6-dev (1.0 unstable [armhf])
+Conf language-support (1.0 unstable [armhf])
+Conf language-tool (1.0 unstable [armhf])
+Conf doxygen (1.0 unstable [all])
+Conf libc6 (1.0 unstable [armhf])
+Conf libc6-dev (1.0 unstable [armhf])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  doxygen language-support language-tool libc6:amd64 libc6-dev:amd64
+0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
+Inst language-support (1.0 unstable [armhf])
+Inst language-tool (1.0 unstable [armhf])
+Inst doxygen (1.0 unstable [all])
+Inst libc6:amd64 (1.0 unstable [amd64])
+Inst libc6-dev:amd64 (1.0 unstable [amd64])
+Conf language-support (1.0 unstable [armhf])
+Conf language-tool (1.0 unstable [armhf])
+Conf doxygen (1.0 unstable [all])
+Conf libc6:amd64 (1.0 unstable [amd64])
+Conf libc6-dev:amd64 (1.0 unstable [amd64])' aptget build-dep apt -s -a amd64
+
+configarchitecture 'amd64' 'armhf'
+
+insertinstalledpackage 'language-support' 'armhf' '0.5' 'Multi-Arch: foreign'
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  doxygen language-tool libc6 libc6-dev
+0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
+Inst language-tool (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [all])
+Inst libc6 (1.0 unstable [amd64])
+Inst libc6-dev (1.0 unstable [amd64])
+Conf language-tool (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [all])
+Conf libc6 (1.0 unstable [amd64])
+Conf libc6-dev (1.0 unstable [amd64])' aptget build-dep apt -s
+
+testequal 'Reading package lists...
+Building dependency tree...
+The following NEW packages will be installed:
+  doxygen language-tool libc6:armhf libc6-dev:armhf
+0 upgraded, 4 newly installed, 0 to remove and 1 not upgraded.
+Inst language-tool (1.0 unstable [amd64])
+Inst doxygen (1.0 unstable [all])
+Inst libc6:armhf (1.0 unstable [armhf])
+Inst libc6-dev:armhf (1.0 unstable [armhf])
+Conf language-tool (1.0 unstable [amd64])
+Conf doxygen (1.0 unstable [all])
+Conf libc6:armhf (1.0 unstable [armhf])
+Conf libc6-dev:armhf (1.0 unstable [armhf])' aptget build-dep apt -s -a armhf