summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2016-03-06 14:44:06 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2016-03-06 15:00:33 +0100
commit06a8e0dcb37796136be983b247c5d1bbfdf47a2e (patch)
treed86c4728aa9ab8da59b317c926c9c667aea1f049 /apt-pkg/deb/deblistparser.cc
parent9e7f83533665c03b52dff5809e7ebd93928ea445 (diff)
get group again after potential remap in Source: parse
Mysteriously segfaults only on i386 for me, but at least one reporter had the same behavior and it makes sense that this is the problem as the parsing of Source: was fixed in 1.2.2 – before the not remapped group was not used. We don't use our usual Dynamic<> trick here as we don't have it in the parser. Its a bit of a layer violation to do this parsing here, but its how it is always was… Until next time with this lovely kind of problem. Closes: 812251 Thanks: Francesco Poli and Marc Haber for testdata.
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 860aa3bc2..ed5484ad9 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -144,7 +144,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
Ver->Section = idx;
}
// Parse the source package name
- pkgCache::GrpIterator const G = Ver.ParentPkg().Group();
+ pkgCache::GrpIterator G = Ver.ParentPkg().Group();
Ver->SourcePkgName = G->Name;
Ver->SourceVerStr = Ver->VerStr;
if (Section.Find("Source",Start,Stop) == true)
@@ -164,6 +164,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
if (version != Ver.VerStr())
{
map_stringitem_t const idx = StoreString(pkgCacheGenerator::VERSIONNUMBER, version);
+ G = Ver.ParentPkg().Group();
Ver->SourceVerStr = idx;
}
}
@@ -190,6 +191,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver)
if (V.end() == true)
{
map_stringitem_t const idx = StoreString(pkgCacheGenerator::PKGNAME, pkgname);
+ G = Ver.ParentPkg().Group();
Ver->SourcePkgName = idx;
}
}