summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-06-29 17:31:06 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2020-06-29 17:32:17 +0200
commitddd8fc3d28cd8e668868158049ced7fa3c8c71b8 (patch)
treeac3241a7d46070a3be4f7d09dd913fd3855dea3f /apt-pkg/deb/deblistparser.cc
parentb5faca7a90e1aa25adb8ee69b979d1f4bd7e8d78 (diff)
Add basic support for the Protected field
This will be mapped to Important for the time being.
Diffstat (limited to 'apt-pkg/deb/deblistparser.cc')
-rw-r--r--apt-pkg/deb/deblistparser.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/apt-pkg/deb/deblistparser.cc b/apt-pkg/deb/deblistparser.cc
index a86f49dc0..240946529 100644
--- a/apt-pkg/deb/deblistparser.cc
+++ b/apt-pkg/deb/deblistparser.cc
@@ -318,6 +318,8 @@ bool debListParser::UsePackage(pkgCache::PkgIterator &Pkg,
return false;
if (Section.FindFlag(pkgTagSection::Key::Important,Pkg->Flags,pkgCache::Flag::Important) == false)
return false;
+ if (Section.FindFlag(pkgTagSection::Key::Protected, Pkg->Flags, pkgCache::Flag::Important) == false)
+ return false;
if (std::find(forceEssential.begin(), forceEssential.end(), Pkg.Name()) != forceEssential.end())
{