summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2011-05-02 11:52:28 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2011-05-02 11:52:28 +0200
commitc80a49f556ae565e280637b4617d6492a1d5a3b8 (patch)
treebfdd20042f16e87fb4c7db4095d85908d17acf11 /apt-pkg
parente876223c704d8cac6246b4aff4bf683fb8b053e3 (diff)
move the mapping generation to the top as the response reading is
currently waiting for the solver to complete and not non-blocking so we can generate the map while waiting for the solver
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/edsp.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc
index 6343b57cd..9dbbbaf26 100644
--- a/apt-pkg/edsp.cc
+++ b/apt-pkg/edsp.cc
@@ -221,11 +221,6 @@ bool EDSP::WriteRequest(pkgDepCache &Cache, FILE* output, bool const Upgrade,
/*}}}*/
// EDSP::ReadResponse - from the given file descriptor /*{{{*/
bool EDSP::ReadResponse(int const input, pkgDepCache &Cache) {
- FileFd in;
- in.OpenDescriptor(input, FileFd::ReadOnly);
- pkgTagFile response(&in);
- pkgTagSection section;
-
/* We build an map id to mmap offset here
In theory we could use the offset as ID, but then VersionCount
couldn't be used to create other versionmappings anymore and it
@@ -236,6 +231,11 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache) {
for (pkgCache::VerIterator V = P.VersionList(); V.end() == false; ++V)
VerIdx[V->ID] = V.Index();
+ FileFd in;
+ in.OpenDescriptor(input, FileFd::ReadOnly);
+ pkgTagFile response(&in);
+ pkgTagSection section;
+
while (response.Step(section) == true) {
std::string type;
if (section.Exists("Install") == true)