summaryrefslogtreecommitdiffstats
path: root/apt-pkg/edsp/edsplistparser.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-13 19:31:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-13 19:31:39 +0000
commitce454ac0189fab0619feba728764927d975ccc90 (patch)
treebef4c6df2894ea52b532efadffca7e579c0d332b /apt-pkg/edsp/edsplistparser.cc
parentAdding debian version 2.9.4. (diff)
downloadapt-ce454ac0189fab0619feba728764927d975ccc90.tar.xz
apt-ce454ac0189fab0619feba728764927d975ccc90.zip
Merging upstream version 2.9.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'apt-pkg/edsp/edsplistparser.cc')
-rw-r--r--apt-pkg/edsp/edsplistparser.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index 5419069..183ace6 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -44,7 +44,20 @@ edspListParser::edspListParser(FileFd * const File) : edspLikeListParser(File)
bool edspLikeListParser::NewVersion(pkgCache::VerIterator &Ver)
{
_system->SetVersionMapping(Ver->ID, Section.FindI("APT-ID", Ver->ID));
- return debListParser::NewVersion(Ver);
+ if (not debListParser::NewVersion(Ver))
+ return false;
+
+ // Patch up the source version, it is stored in the Source-Version field in EDSP.
+ if (APT::StringView version = Section.Find(pkgTagSection::Key::Source_Version); not version.empty())
+ {
+ if (version != Ver.VerStr())
+ {
+ map_stringitem_t const idx = StoreString(pkgCacheGenerator::VERSIONNUMBER, version);
+ Ver->SourceVerStr = idx;
+ }
+ }
+
+ return true;
}
/*}}}*/
// ListParser::Description - Return the description string /*{{{*/