]> git.saurik.com Git - apt.git/commitdiff
ensure that architectures are not added multiple times
authorDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 10 Feb 2012 14:01:31 +0000 (15:01 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Fri, 10 Feb 2012 14:01:31 +0000 (15:01 +0100)
apt-pkg/aptconfiguration.cc
debian/changelog

index 721b6fd638ce25e604a4a7c6264022fad8999205..4324f0e6395e60fcba7d728658bc9931862d1156 100644 (file)
@@ -392,7 +392,9 @@ std::vector<std::string> const Configuration::getArchitectures(bool const &Cache
                                        if (arch[0] != '\0') {
                                                char const* archend = arch;
                                                for (; isspace(*archend) == 0 && *archend != '\0'; ++archend);
-                                               archs.push_back(string(arch, (archend - arch)));
+                                               string a(arch, (archend - arch));
+                                               if (std::find(archs.begin(), archs.end(), a) == archs.end())
+                                                       archs.push_back(a);
                                        }
                                        arch = strtok(NULL, " ");
                                }
index 9d22d04d99f4bb281da5ce32e7b5b8570e43587a..8f550cdaebbb9c628dab88400a3745ae01a10c20 100644 (file)
@@ -16,6 +16,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
       in a content-negotation attempt (Closes: #657560)
   * apt-pkg/aptconfiguration.cc:
     - chroot if needed before calling dpkg --print-foreign-architectures
+    - ensure that architectures are not added multiple times
 
   [ Steve Langasek ]
   * cmdline/apt-get.cc:
@@ -38,7 +39,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
   * apt-pkg/contrib/fileutl.h:
     - fix compat with FileFd::OpenDescriptor() in ReadOnlyGzip mode
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Thu, 09 Feb 2012 18:05:34 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Fri, 10 Feb 2012 15:00:10 +0100
 
 apt (0.8.16~exp12) experimental; urgency=low