From 4bcb198a67156b2654f3b64173499ab78f0d4d9a Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 15 Feb 2025 16:37:19 +0100 Subject: cache: Introduce partial SourceVersion support This is the first step that introduces a 1:1 mapping between version and source version. In a future version this can use the fields currently marked unavailable to deduplicate the SourceVersion objects across the group. The policy gains a member for storing pins for sourceversions. Together, in the future we should be able to determine candidates for source versions. --- apt-pkg/deb/deblistparser.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc index e3041f848..dfb07d2a6 100644 --- a/apt-pkg/deb/deblistparser.cc +++ b/apt-pkg/deb/deblistparser.cc @@ -169,8 +169,8 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) pkgCache::GrpIterator G = Ver.ParentPkg().Group(); // Setup the defaults - Ver->SourcePkgName = G->Name; - Ver->SourceVerStr = Ver->VerStr; + Ver.SourceVersion()->Group = G.MapPointer(); + Ver.SourceVersion()->VerStr = Ver->VerStr; // Parse the name and version str if (Section.Find(pkgTagSection::Key::Source,Start,Stop) == true) @@ -191,7 +191,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) { map_stringitem_t const idx = StoreString(pkgCacheGenerator::VERSIONNUMBER, version); G = Ver.ParentPkg().Group(); - Ver->SourceVerStr = idx; + Ver.SourceVersion()->VerStr = idx; } } } @@ -208,7 +208,7 @@ bool debListParser::NewVersion(pkgCache::VerIterator &Ver) } // Link into by source package group. - Ver->SourcePkgName = G->Name; + Ver.SourceVersion()->Group = G.MapPointer(); Ver->NextInSource = G->VersionsInSource; G->VersionsInSource = Ver.MapPointer(); -- cgit v1.2.3-70-g09d2