summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-06-03 14:40:06 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-06-27 11:57:12 +0200
commit14bed2c0108a99d68f453ff61273d5ae59a5c3f0 (patch)
treed364e61152f0ca9061ad51817f5749e7c4bfbb62 /apt-pkg/edsp.cc
parent4cdc3bf0e24a74b0af45e1cbabfcaebd9d0c3318 (diff)
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.
Diffstat (limited to 'apt-pkg/edsp.cc')
-rw-r--r--apt-pkg/edsp.cc29
1 files changed, 29 insertions, 0 deletions
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)