summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-06-18 20:23:53 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-06-18 20:23:53 +0200
commitbc5095b7d708c7e376f98be6edc2ad7cceca57ed (patch)
tree8b45f6fc974330f964bad3684ac85550480fb66b /apt-pkg/edsp.cc
parent456821f91483f45b3ceb156f54ccc27983b71595 (diff)
parent51da0c3587c9d36a3c04b3e28b99d8331a29b230 (diff)
Merge remote-tracking branch 'upstream/debian/sid' into debian/sid
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index 6d1b68c23..0d0418e06 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -26,6 +26,7 @@
#include <time.h>
#include <unistd.h>
#include <stdio.h>
+#include <algorithm>
#include <iostream>
#include <vector>
#include <limits>
@@ -50,7 +51,12 @@ bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
if (Progress != NULL)
Progress->SubProgress(Cache.Head().VersionCount, _("Send scenario to solver"));
unsigned long p = 0;
+ std::vector<std::string> archs = APT::Configuration::getArchitectures();
for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg)
+ {
+ std::string const arch = Pkg.Arch();
+ if (std::find(archs.begin(), archs.end(), arch) == archs.end())
+ continue;
for (pkgCache::VerIterator Ver = Pkg.VersionList(); Ver.end() == false; ++Ver, ++p)
{
WriteScenarioVersion(Cache, output, Pkg, Ver);
@@ -59,6 +65,7 @@ bool EDSP::WriteScenario(pkgDepCache &Cache, FILE* output, OpProgress *Progress)
if (Progress != NULL && p % 100 == 0)
Progress->Progress(p);
}
+ }
return true;
}
/*}}}*/