diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-06-22 12:34:11 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-08-10 17:25:26 +0200 |
commit | 268ffcebb9ae4278b1e3c3f89f8167f229164dbd (patch) | |
tree | cd8e03aa1e1743481e05fe1195c1d4f3ce78e125 /apt-pkg/deb/debmetaindex.h | |
parent | 81460e32961bb0b9922bf8a1a27d87705d8c3e51 (diff) |
detect and error out on conflicting Trusted settings
A specific trust state can be enforced via a sources.list option, but it
effects all entries handled by the same Release file, not just the entry
it was given on so we enforce acknowledgement of this by requiring the
same value to be (not) set on all such entries.
Diffstat (limited to 'apt-pkg/deb/debmetaindex.h')
-rw-r--r-- | apt-pkg/deb/debmetaindex.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h index 9b60b6137..a6db4e287 100644 --- a/apt-pkg/deb/debmetaindex.h +++ b/apt-pkg/deb/debmetaindex.h @@ -27,8 +27,6 @@ class APT_HIDDEN debReleaseIndex : public metaIndex { debReleaseIndexPrivate * const d; - enum APT_HIDDEN { ALWAYS_TRUSTED, NEVER_TRUSTED, CHECK_TRUST } Trusted; - public: APT_HIDDEN std::string MetaIndexInfo(const char *Type) const; @@ -51,7 +49,11 @@ class APT_HIDDEN debReleaseIndex : public metaIndex virtual std::vector <pkgIndexFile *> *GetIndexFiles(); - void SetTrusted(bool const Trusted); + enum APT_HIDDEN TriState { + TRI_YES, TRI_DONTCARE, TRI_NO, TRI_UNSET + }; + bool SetTrusted(TriState const Trusted); + virtual bool IsTrusted() const; void AddComponent(bool const isSrc, std::string const &Name, |