diff options
| author | Julian Andres Klode <jak@debian.org> | 2024-06-13 15:44:05 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2024-06-13 15:44:05 +0000 |
| commit | 3bfb483c8013eeb9bd3ce36aab1ef937ac9ffa6d (patch) | |
| tree | ca35427f711152e183cdb4dd7e4b4ecbe411f82f | |
| parent | b8dfc6c3f3e5e71c1268c69d26278805eb3c5424 (diff) | |
| parent | c79bf305f6c3ba92972cd9c39f8d28c396c63bc4 (diff) | |
Merge branch 'edsp-source-version' into 'main'
edsp: Parse source version from the Source-Version field
See merge request apt-team/apt!354
| -rw-r--r-- | apt-pkg/edsp/edsplistparser.cc | 15 | ||||
| -rw-r--r-- | apt-pkg/tagfile-keys.list | 1 |
2 files changed, 15 insertions, 1 deletions
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc index 5419069f2..183ace654 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 /*{{{*/ diff --git a/apt-pkg/tagfile-keys.list b/apt-pkg/tagfile-keys.list index 4b57e46c2..d198ea0a5 100644 --- a/apt-pkg/tagfile-keys.list +++ b/apt-pkg/tagfile-keys.list @@ -80,3 +80,4 @@ Vcs-Mtn Vcs-Svn Version ### APPEND BELOW, sort in with next ABI break ### +Source-Version |
