From dd7233af3e0287566af3946da4b06afd6ccca73a Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 10 Feb 2012 15:01:31 +0100 Subject: ensure that architectures are not added multiple times --- apt-pkg/aptconfiguration.cc | 4 +++- debian/changelog | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apt-pkg/aptconfiguration.cc b/apt-pkg/aptconfiguration.cc index 721b6fd63..4324f0e63 100644 --- a/apt-pkg/aptconfiguration.cc +++ b/apt-pkg/aptconfiguration.cc @@ -392,7 +392,9 @@ std::vector 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, " "); } diff --git a/debian/changelog b/debian/changelog index 9d22d04d9..8f550cdae 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 09 Feb 2012 18:05:34 +0100 + -- David Kalnischkies Fri, 10 Feb 2012 15:00:10 +0100 apt (0.8.16~exp12) experimental; urgency=low -- cgit v1.2.3