summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgcache.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-10-25 18:42:24 +0000
committerJulian Andres Klode <jak@debian.org>2025-10-25 18:42:24 +0000
commit2698c1e186accebefa320ebacde7ec3c40c66c29 (patch)
tree100d5321f364b389100928e927639e852c52ff48 /apt-pkg/pkgcache.cc
parenta92a5ecc465055027d9fbb899f359ec7eab110bd (diff)
parent9d62eef571ffd1fd2df8b97884d3689fced27fb1 (diff)
Merge branch 'variants-submit' into 'main'
Merge Architecture variants from Ubuntu See merge request apt-team/apt!526
Diffstat (limited to 'apt-pkg/pkgcache.cc')
-rw-r--r--apt-pkg/pkgcache.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 4101fb4e5..3377facac 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -193,6 +193,17 @@ bool pkgCache::ReMap(bool const &Errorchecks)
list.append(",");
list.append(arch);
}
+ auto const variants = APT::Configuration::getArchitectureVariants(true);
+ if (not variants.empty())
+ {
+ list.append(";");
+ for (auto const &variant : variants)
+ {
+ if (list.back() != ';')
+ list.append(",");
+ list.append(variant.name);
+ }
+ }
if (_config->Find("APT::Architecture") != StrP + HeaderP->Architecture ||
list != StrP + HeaderP->GetArchitectures())
return _error->Error(_("The package cache was built for different architectures: %s vs %s"), StrP + HeaderP->GetArchitectures(), list.c_str());