summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-01-08 14:07:09 +0000
committerJulian Andres Klode <jak@debian.org>2021-01-08 14:07:09 +0000
commitd35d51ddbdc75512a73e713972f4bbb5a1fd73ae (patch)
tree9fb90d98cb20bb0be193a63efc7c32b513408bad /apt-pkg/deb/deblistparser.cc
parent4d28ddc501738d571c21ff6d41168f6c53ea462d (diff)
parentbd64bb79537fac17e1474672402d6b0572dce94a (diff)
Merge branch 'pu/phased-updates' into 'master'
Add support for Phased-Update-Percentage See merge request apt-team/apt!129
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index 95f6f6fc8..b5c9c066e 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -338,6 +338,13 @@ bool debListParser::UsePackage(pkgCache::PkgIterator &Pkg,
else if (std::find(forceImportant.begin(), forceImportant.end(), Pkg.Name()) != forceImportant.end())
Pkg->Flags |= pkgCache::Flag::Important;
+ auto phased = Section.FindULL(pkgTagSection::Key::Phased_Update_Percentage, 100);
+ if (phased != 100)
+ {
+ if (not Ver.PhasedUpdatePercentage(phased))
+ _error->Warning("Ignoring invalid Phased-Update-Percentage value");
+ }
+
if (ParseStatus(Pkg,Ver) == false)
return false;
return true;