From 14bed2c0108a99d68f453ff61273d5ae59a5c3f0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 3 Jun 2016 14:40:06 +0200 Subject: eipp: properly handle arch-specific provides The generation of the EIPP request was a bit to strict not generation what would actually be needed to be part of the scenario. --- apt-pkg/edsp.cc | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'apt-pkg') diff --git a/apt-pkg/edsp.cc b/apt-pkg/edsp.cc index f2d728933..21f7f3607 100644 --- a/apt-pkg/edsp.cc +++ b/apt-pkg/edsp.cc @@ -1218,6 +1218,35 @@ bool EIPP::WriteScenario(pkgDepCache &Cache, FileFd &output, OpProgress * const pkgset[PV->ID] = true; } pkgset[P->ID] = true; + if (strcmp(P.Arch(), "any") == 0) + { + APT::StringView const pkgname(P.Name()); + auto const idxColon = pkgname.find(':'); + if (idxColon != APT::StringView::npos) + { + pkgCache::PkgIterator PA; + if (pkgname.substr(idxColon + 1) == "any") + { + auto const GA = Cache.FindGrp(pkgname.substr(0, idxColon).to_string()); + for (auto PA = GA.PackageList(); PA.end() == false; PA = GA.NextPkg(PA)) + { + pkgset[PA->ID] = true; + } + } + else + { + auto const PA = Cache.FindPkg(pkgname.to_string()); + if (PA.end() == false) + pkgset[PA->ID] = true; + } + } + } + else + { + auto const PA = Cache.FindPkg(P.FullName(false), "any"); + if (PA.end() == false) + pkgset[PA->ID] = true; + } } }; for (pkgCache::PkgIterator Pkg = Cache.PkgBegin(); Pkg.end() == false; ++Pkg) -- cgit v1.2.3