diff options
| author | Julian Andres Klode <jak@debian.org> | 2025-05-25 19:39:45 +0200 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2025-05-26 12:08:29 +0200 |
| commit | 9d0f306b3e1b4a485b6fb31e90ae849d2a46c636 (patch) | |
| tree | 22d2c31cc378f43bb73d9915a2b27321f0709a59 /apt-pkg | |
| parent | b3acf5ffb28b26f7766cf4eac9b9553a3f118bff (diff) | |
solver3: Allow CompareProviders3 with empty package
This can be used to compare arbitrary packages in non-dependency
contexts. It remains to be seen whether this is a meaningful
approach.
Diffstat (limited to 'apt-pkg')
| -rw-r--r-- | apt-pkg/solver3.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/solver3.cc b/apt-pkg/solver3.cc index 749633d52..489d4081b 100644 --- a/apt-pkg/solver3.cc +++ b/apt-pkg/solver3.cc @@ -135,7 +135,7 @@ struct APT::Solver::CompareProviders3 /*{{{*/ if ((A->CurrentVer == 0 || B->CurrentVer == 0) && A->CurrentVer != B->CurrentVer) return A->CurrentVer != 0; // Prefer packages in the same group as the target; e.g. foo:i386, foo:amd64 - if (A->Group != B->Group) + if (A->Group != B->Group && not Pkg.end()) { if (A->Group == Pkg->Group && B->Group != Pkg->Group) return true; |
