diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-01 13:56:09 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-08-01 13:56:09 +0200 |
commit | a1e9379a86f199817d275b2d28d1a6b61039fcaa (patch) | |
tree | 46aff20a5312e249f9f40df3a380acbf415ae41d /apt-pkg/pkgcachegen.cc | |
parent | 5763d19a89ea634fbd08aa8b97dd7ad8165fdab8 (diff) | |
parent | 77de0e831a12aedde05ff6bff8fb07dcbb4074ad (diff) |
merged from lp:~mvo/apt/mvo
Diffstat (limited to 'apt-pkg/pkgcachegen.cc')
-rw-r--r-- | apt-pkg/pkgcachegen.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc index 2b6d294fb..3c21b2442 100644 --- a/apt-pkg/pkgcachegen.cc +++ b/apt-pkg/pkgcachegen.cc @@ -637,7 +637,9 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress) Dynamic<pkgCache::VerIterator> DynV(V); for (; V.end() != true; V++) { - char const * const Arch = P.Arch(); + // copy P.Arch() into a string here as a cache remap + // in NewDepends() later may alter the pointer location + string Arch = P.Arch() == NULL ? "" : P.Arch(); map_ptrloc *OldDepLast = NULL; /* MultiArch handling introduces a lot of implicit Dependencies: - MultiArch: same → Co-Installable if they have the same version @@ -646,7 +648,7 @@ bool pkgCacheGenerator::FinishCache(OpProgress *Progress) bool const coInstall = ((V->MultiArch & pkgCache::Version::Same) == pkgCache::Version::Same); for (vector<string>::const_iterator A = archs.begin(); A != archs.end(); ++A) { - if (Arch == 0 || *A == Arch) + if (*A == Arch) continue; /* We allow only one installed arch at the time per group, therefore each group member conflicts |