diff options
| author | Julian Andres Klode <jak@debian.org> | 2025-06-10 11:47:41 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-06-10 16:27:36 +0200 |
| commit | 15f48dcd65fb17a4cb4cd1f93b872b3bb810c3b2 (patch) | |
| tree | b5bd06dd82dc44e64f16eeb3c98d53d1cfaa0546 /apt-pkg/solver3.cc | |
| parent | e3d854ebfa62662752cdf68136208f907d0a7cd7 (diff) | |
solver3: Ignore Architecture: all for obsoleted-by
In case a new version of the source package is published, we
check that if there's a newer binary for the same architecture
and then consider the binary obsoleted.
This logic did not properly account for Architecture: all packages
which are considered as native architecture package with an "All"
multi-arch flag set, and hence a native architecture package may
inadvertently be considered obsoleted by a package that only built
on Architecture: all.
Diffstat (limited to 'apt-pkg/solver3.cc')
| -rw-r--r-- | apt-pkg/solver3.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index a458acb0b..c53911a80 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -499,7 +499,9 @@ bool APT::Solver::ObsoletedByNewerSourceVersion(pkgCache::VerIterator cand) cons for (auto ver = cand.Cache()->FindGrp(cand.SourcePkgName()).VersionsInSource(); not ver.end(); ver = ver.NextInSource()) { // We are only interested in other packages in the same source package; built for the same architecture. - if (ver->ParentPkg == cand->ParentPkg || ver.ParentPkg()->Arch != cand.ParentPkg()->Arch || cache.VS->CmpVersion(ver.SourceVerStr(), cand.SourceVerStr()) <= 0) + if (ver->ParentPkg == cand->ParentPkg || ver.ParentPkg()->Arch != cand.ParentPkg()->Arch || + (ver->MultiArch & pkgCache::Version::All) != (cand->MultiArch & pkgCache::Version::All) || + cache.VS->CmpVersion(ver.SourceVerStr(), cand.SourceVerStr()) <= 0) continue; // We also take equal priority here, given that we have a higher version |
