apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

depcache.h
Go to the documentation of this file.
1 // -*- mode: c++; mode: fold -*-
2 // Description /*{{{*/
3 /* ######################################################################
4 
5  DepCache - Dependency Extension data for the cache
6 
7  This class stores the cache data and a set of extension structures for
8  monitoring the current state of all the packages. It also generates and
9  caches the 'install' state of many things. This refers to the state of the
10  package after an install has been run.
11 
12  The StateCache::State field can be -1,0,1,2 which is <,=,>,no current.
13  StateCache::Mode is which of the 3 fields is active.
14 
15  This structure is important to support the readonly status of the cache
16  file. When the data is saved the cache will be refereshed from our
17  internal rep and written to disk. Then the actual persistent data
18  files will be put on the disk.
19 
20  Each dependency is compared against 3 target versions to produce to
21  3 dependency results.
22  Now - Compared using the Currently install version
23  Install - Compared using the install version (final state)
24  CVer - (Candidate Version) Compared using the Candidate Version
25  The candidate and now results are used to decide whether a package
26  should be automatically installed or if it should be left alone.
27 
28  Remember, the Candidate Version is selected based on the distribution
29  settings for the Package. The Install Version is selected based on the
30  state (Delete, Keep, Install) field and can be either the Current Version
31  or the Candidate version.
32 
33  The Candidate version is what is shown the 'Install Version' field.
34 
35  ##################################################################### */
36  /*}}}*/
37 #ifndef PKGLIB_DEPCACHE_H
38 #define PKGLIB_DEPCACHE_H
39 
40 #include <apt-pkg/configuration.h>
41 #include <apt-pkg/macros.h>
42 #include <apt-pkg/pkgcache.h>
43 
44 #include <stddef.h>
45 
46 #include <list>
47 #include <memory>
48 #include <string>
49 #include <utility>
50 
51 
52 class OpProgress;
54 namespace APT
55 {
56 template <class Container>
57 class PackageContainer;
58 using PackageVector = PackageContainer<std::vector<pkgCache::PkgIterator>>;
59 } // namespace APT
60 
62 {
63  public:
64 
65  /** \brief An arbitrary predicate on packages. */
67  {
68  public:
69  virtual bool InRootSet(const pkgCache::PkgIterator &/*pkg*/) {return false;};
70  virtual ~InRootSetFunc() {};
71  };
72 
73  private:
74  /** \brief Mark a single package and all its unmarked important
75  * dependencies during mark-and-sweep.
76  *
77  * Recursively invokes itself to mark all dependencies of the
78  * package.
79  *
80  * \param pkg The package to mark.
81  *
82  * \param ver The version of the package that is to be marked.
83  *
84  * \param follow_recommends If \b true, recommendations of the
85  * package will be recursively marked.
86  *
87  * \param follow_suggests If \b true, suggestions of the package
88  * will be recursively marked.
89  *
90  * \param reason The reason why the package is being marked.
91  * (Used in logging when Debug::pkgAutoRemove is set.)
92  */
93  APT_HIDDEN void MarkPackage(const pkgCache::PkgIterator &pkg,
94  const pkgCache::VerIterator &ver,
95  bool const &follow_recommends,
96  bool const &follow_suggests,
97  const char *reason);
98 
99  /** \brief Update the Marked field of all packages.
100  *
101  * Each package's StateCache::Marked field will be set to \b true
102  * if and only if it can be reached from the root set. By
103  * default, the root set consists of the set of manually installed
104  * or essential packages, but it can be extended using the
105  * parameter #rootFunc.
106  *
107  * \param rootFunc A callback that can be used to add extra
108  * packages to the root set.
109  *
110  * \return \b false if an error occurred.
111  */
112  bool MarkRequired(InRootSetFunc &rootFunc);
113 
114  /** \brief Set the StateCache::Garbage flag on all packages that
115  * should be removed.
116  *
117  * Packages that were not marked by the last call to #MarkRequired
118  * are tested to see whether they are actually garbage. If so,
119  * they are marked as such.
120  *
121  * \return \b false if an error occurred.
122  */
123  bool Sweep();
124 
125  public:
126 
127  // These flags are used in DepState
128  enum DepFlags {DepNow = (1 << 0),DepInstall = (1 << 1),DepCVer = (1 << 2),
129  DepGNow = (1 << 3),DepGInstall = (1 << 4),DepGCVer = (1 << 5)};
130 
131  // These flags are used in StateCache::DepState
132  enum DepStateFlags {DepNowPolicy = (1 << 0), DepNowMin = (1 << 1),
133  DepInstPolicy = (1 << 2), DepInstMin = (1 << 3),
134  DepCandPolicy = (1 << 4), DepCandMin = (1 << 5)};
135 
136  // These flags are used in StateCache::iFlags
137  enum InternalFlags {AutoKept = (1 << 0), Purge = (1 << 1), ReInstall = (1 << 2), Protected = (1 << 3)};
138 
139  enum VersionTypes {NowVersion, InstallVersion, CandidateVersion};
140  enum ModeList {ModeDelete = 0, ModeKeep = 1, ModeInstall = 2, ModeGarbage = 3};
141 
142  /** \brief Represents an active action group.
143  *
144  * An action group is a group of actions that are currently being
145  * performed. While an active group is active, certain routine
146  * clean-up actions that would normally be performed after every
147  * cache operation are delayed until the action group is
148  * completed. This is necessary primarily to avoid inefficiencies
149  * when modifying a large number of packages at once.
150  *
151  * This class represents an active action group. Creating an
152  * instance will create an action group; destroying one will
153  * destroy the corresponding action group.
154  *
155  * The following operations are suppressed by this class:
156  *
157  * - Keeping the Marked and Garbage flags up to date.
158  *
159  * \note This can be used in the future to easily accumulate
160  * atomic actions for undo or to display "what apt did anyway";
161  * e.g., change the counter of how many action groups are active
162  * to a std::set of pointers to them and use those to store
163  * information about what happened in a group in the group.
164  */
166  {
167  void * const d;
169 
170  bool released;
171 
172  /** Action groups are noncopyable. */
174  public:
175  /** \brief Create a new ActionGroup.
176  *
177  * \param cache The cache that this ActionGroup should
178  * manipulate.
179  *
180  * As long as this object exists, no automatic cleanup
181  * operations will be undertaken.
182  */
183  explicit ActionGroup(pkgDepCache &cache);
184 
185  /** \brief Clean up the action group before it is destroyed.
186  *
187  * If it is destroyed later, no second cleanup will be run.
188  */
189  void release();
190 
191  /** \brief Destroy the action group.
192  *
193  * If this is the last action group, the automatic cache
194  * cleanup operations will be undertaken.
195  */
196  virtual ~~ActionGroup();
197  };
198 
199  /** \brief Returns \b true for packages matching a regular
200  * expression in APT::NeverAutoRemove.
201  */
203  {
204  public:
205  DefaultRootSetFunc() : Configuration::MatchAgainstConfig("APT::NeverAutoRemove") {};
206  virtual ~DefaultRootSetFunc() {};
207 
208  bool InRootSet(const pkgCache::PkgIterator &pkg) APT_OVERRIDE { return pkg.end() == false && Match(pkg.Name()); };
209  };
210 
212  {
213  // text versions of the two version fields
214  const char *CandVersion;
215  const char *CurVersion;
216 
217  // Pointer to the candidate install version.
219 
220  // Pointer to the install version.
222 
223  // Copy of Package::Flags
224  unsigned short Flags;
225  unsigned short iFlags; // Internal flags
226 
227  /** \brief \b true if this package can be reached from the root set. */
228  bool Marked;
229 
230  /** \brief \b true if this package is unused and should be removed.
231  *
232  * This differs from !#Marked, because it is possible that some
233  * unreachable packages will be protected from becoming
234  * garbage.
235  */
236  bool Garbage;
237 
238  // Various tree indicators
239  signed char Status; // -1,0,1,2
240  unsigned char Mode; // ModeList
241  unsigned char DepState; // DepState Flags
242 
243  // Update of candidate version
244  void Update(PkgIterator Pkg,pkgCache &Cache);
245 
246  // Various test members for the current status of the package
247  inline bool NewInstall() const {return Status == 2 && Mode == ModeInstall;};
248  inline bool Delete() const {return Mode == ModeDelete;};
249  inline bool Purge() const {return Delete() == true && (iFlags & pkgDepCache::Purge) == pkgDepCache::Purge; };
250  inline bool Keep() const {return Mode == ModeKeep;};
251  inline bool Protect() const {return (iFlags & Protected) == Protected;};
252  inline bool Upgrade() const {return Status > 0 && Mode == ModeInstall;};
253  inline bool Upgradable() const {return Status >= 1 && CandidateVer != NULL;};
254  inline bool Downgrade() const {return Status < 0 && Mode == ModeInstall;};
255  inline bool Held() const {return Status != 0 && Keep();};
256  inline bool NowBroken() const {return (DepState & DepNowMin) != DepNowMin;};
257  inline bool NowPolicyBroken() const {return (DepState & DepNowPolicy) != DepNowPolicy;};
258  inline bool InstBroken() const {return (DepState & DepInstMin) != DepInstMin;};
259  inline bool InstPolicyBroken() const {return (DepState & DepInstPolicy) != DepInstPolicy;};
260  inline bool Install() const {return Mode == ModeInstall;};
261  inline bool ReInstall() const {return Delete() == false && (iFlags & pkgDepCache::ReInstall) == pkgDepCache::ReInstall;};
263  {return VerIterator(Cache,InstallVer);};
265  {return VerIterator(Cache,CandidateVer);};
266  };
267 
268  // Helper functions
269  void BuildGroupOrs(VerIterator const &V);
270  void UpdateVerState(PkgIterator const &Pkg);
271 
272  // User Policy control
274  {
275  public:
276  Policy() {
277  InstallRecommends = _config->FindB("APT::Install-Recommends", false);
278  InstallSuggests = _config->FindB("APT::Install-Suggests", false);
279  }
280 
281  virtual VerIterator GetCandidateVer(PkgIterator const &Pkg);
282  virtual bool IsImportantDep(DepIterator const &Dep) const;
283  virtual signed short GetPriority(PkgIterator const &Pkg);
284  virtual signed short GetPriority(VerIterator const &Ver, bool ConsiderFiles=true);
285  virtual signed short GetPriority(PkgFileIterator const &File);
286 
287  virtual ~Policy() {};
288 
289  private:
292  };
293 
294  private:
295  /** The number of open "action groups"; certain post-action
296  * operations are suppressed if this number is > 0.
297  */
299 
300  friend class ActionGroup;
301 
302  protected:
303 
304  // State information
307  unsigned char *DepState;
308 
309  /** Stores the space changes after installation */
310  signed long long iUsrSize;
311  /** Stores how much we need to download to get the packages */
312  unsigned long long iDownloadSize;
313  unsigned long iInstCount;
314  unsigned long iDelCount;
315  unsigned long iKeepCount;
316  unsigned long iBrokenCount;
317  unsigned long iPolicyBrokenCount;
318  unsigned long iBadCount;
319 
322 
323  Policy *delLocalPolicy; // For memory clean up..
325 
326  // Check for a matching provides
327  bool CheckDep(DepIterator const &Dep,int const Type,PkgIterator &Res);
328  inline bool CheckDep(DepIterator const &Dep,int const Type)
329  {
330  PkgIterator Res(*this,0);
331  return CheckDep(Dep,Type,Res);
332  }
333 
334  // Computes state information for deps and versions (w/o storing)
335  unsigned char DependencyState(DepIterator const &D);
336  unsigned char VersionState(DepIterator D,unsigned char const Check,
337  unsigned char const SetMin,
338  unsigned char const SetPolicy) const;
339 
340  // Recalculates various portions of the cache, call after changing something
341  void Update(DepIterator Dep); // Mostly internal
342  void Update(PkgIterator const &P);
343 
344  // Count manipulators
345  void AddSizes(const PkgIterator &Pkg, bool const Invert = false);
346  inline void RemoveSizes(const PkgIterator &Pkg) {AddSizes(Pkg, true);};
347  void AddStates(const PkgIterator &Pkg, bool const Invert = false);
348  inline void RemoveStates(const PkgIterator &Pkg) {AddStates(Pkg,true);};
349 
350  public:
351 
352  // Legacy.. We look like a pkgCache
353  inline operator pkgCache &() {return *Cache;};
354  inline Header &Head() {return *Cache->HeaderP;};
355  inline GrpIterator GrpBegin() {return Cache->GrpBegin();};
356  inline PkgIterator PkgBegin() {return Cache->PkgBegin();};
357  inline GrpIterator FindGrp(APT::StringView Name) {return Cache->FindGrp(Name);};
358  inline PkgIterator FindPkg(APT::StringView Name) {return Cache->FindPkg(Name);};
359  inline PkgIterator FindPkg(APT::StringView Name, APT::StringView Arch) {return Cache->FindPkg(Name, Arch);};
360 
361  inline pkgCache &GetCache() {return *Cache;};
362  inline pkgVersioningSystem &VS() {return *Cache->VS;};
363 
364  inline bool IsImportantDep(DepIterator Dep) const {return LocalPolicy->IsImportantDep(Dep);};
365  inline Policy &GetPolicy() {return *LocalPolicy;};
366 
367  // Accessors
368  inline StateCache &operator [](PkgIterator const &I) {return PkgState[I->ID];};
369  inline StateCache &operator [](PkgIterator const &I) const {return PkgState[I->ID];};
370  inline unsigned char &operator [](DepIterator const &I) {return DepState[I->ID];};
371  inline unsigned char const &operator [](DepIterator const &I) const {return DepState[I->ID];};
372 
373  /** \return A function identifying packages in the root set other
374  * than manually installed packages and essential packages, or \b
375  * NULL if an error occurs.
376  *
377  * \todo Is this the best place for this function? Perhaps the
378  * settings for mark-and-sweep should be stored in a single
379  * external class?
380  */
381  virtual InRootSetFunc *GetRootSetFunc();
382 
383  /** This should return const really - do not delete. */
384  InRootSetFunc *GetCachedRootSetFunc() APT_HIDDEN;
385 
386  /** \return \b true if the garbage collector should follow recommendations.
387  */
388  virtual bool MarkFollowsRecommends();
389 
390  /** \return \b true if the garbage collector should follow suggestions.
391  */
392  virtual bool MarkFollowsSuggests();
393 
394  /** \brief Update the Marked and Garbage fields of all packages.
395  *
396  * This routine is implicitly invoked after all state manipulators
397  * and when an ActionGroup is destroyed. It invokes the private
398  * MarkRequired() and Sweep() to do its dirty work.
399  *
400  * \param rootFunc A predicate that returns \b true for packages
401  * that should be added to the root set.
402  */
403  bool MarkAndSweep(InRootSetFunc &rootFunc);
404  bool MarkAndSweep();
405 
406  /** \name State Manipulators
407  */
408  // @{
409  bool MarkKeep(PkgIterator const &Pkg, bool Soft = false,
410  bool FromUser = true, unsigned long Depth = 0);
411  bool MarkDelete(PkgIterator const &Pkg, bool MarkPurge = false,
412  unsigned long Depth = 0, bool FromUser = true);
413  bool MarkInstall(PkgIterator const &Pkg,bool AutoInst = true,
414  unsigned long Depth = 0, bool FromUser = true,
415  bool ForceImportantDeps = false);
416  void MarkProtected(PkgIterator const &Pkg) { PkgState[Pkg->ID].iFlags |= Protected; };
417 
418  void SetReInstall(PkgIterator const &Pkg,bool To);
419 
420  /** @return 'the' candidate version of a package
421  *
422  * The version returned is the version previously set explicitly via
423  * SetCandidate* methods like #SetCandidateVersion or if there wasn't one
424  * set the version as chosen via #Policy.
425  *
426  * @param Pkg is the package to return the candidate for
427  */
429  void SetCandidateVersion(VerIterator TargetVer);
430  bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
431  std::string const &TargetRel);
432  /** Set the candidate version for dependencies too if needed.
433  *
434  * Sets not only the candidate version as SetCandidateVersion does,
435  * but walks also down the dependency tree and checks if it is required
436  * to set the candidate of the dependency to a version from the given
437  * release, too.
438  *
439  * \param TargetVer new candidate version of the package
440  * \param TargetRel try to switch to this release if needed
441  * \param[out] Changed a list of pairs consisting of the \b old
442  * version of the changed package and the version which
443  * required the switch of this dependency
444  * \return \b true if the switch was successful, \b false otherwise
445  */
446  bool SetCandidateRelease(pkgCache::VerIterator TargetVer,
447  std::string const &TargetRel,
448  std::list<std::pair<pkgCache::VerIterator, pkgCache::VerIterator> > &Changed);
449 
450  /** Set the "is automatically installed" flag of Pkg. */
451  void MarkAuto(const PkgIterator &Pkg, bool Auto);
452  // @}
453 
454  /** \return \b true if it's OK for MarkInstall to install
455  * the given package.
456  *
457  * The default implementation simply calls all IsInstallOk*
458  * method mentioned below.
459  *
460  * Overriding implementations should use the hold-state-flag to
461  * cache results from previous checks of this package - if possible.
462  *
463  * The parameters are the same as in the calling MarkInstall:
464  * \param Pkg the package that MarkInstall wants to install.
465  * \param AutoInst install this and all its dependencies
466  * \param Depth recursive deep of this Marker call
467  * \param FromUser was the install requested by the user?
468  */
469  virtual bool IsInstallOk(const PkgIterator &Pkg,bool AutoInst = true,
470  unsigned long Depth = 0, bool FromUser = true);
471 
472  /** \return \b true if it's OK for MarkDelete to remove
473  * the given package.
474  *
475  * The default implementation simply calls all IsDeleteOk*
476  * method mentioned below, see also #IsInstallOk.
477  *
478  * The parameters are the same as in the calling MarkDelete:
479  * \param Pkg the package that MarkDelete wants to remove.
480  * \param MarkPurge should we purge instead of "only" remove?
481  * \param Depth recursive deep of this Marker call
482  * \param FromUser was the remove requested by the user?
483  */
484  virtual bool IsDeleteOk(const PkgIterator &Pkg,bool MarkPurge = false,
485  unsigned long Depth = 0, bool FromUser = true);
486 
487  // read persistent states
488  bool readStateFile(OpProgress * const prog);
489  bool writeStateFile(OpProgress * const prog, bool const InstalledOnly=true);
490 
491  // Size queries
492  inline signed long long UsrSize() {return iUsrSize;};
493  inline unsigned long long DebSize() {return iDownloadSize;};
494  inline unsigned long DelCount() {return iDelCount;};
495  inline unsigned long KeepCount() {return iKeepCount;};
496  inline unsigned long InstCount() {return iInstCount;};
497  inline unsigned long BrokenCount() {return iBrokenCount;};
498  inline unsigned long PolicyBrokenCount() {return iPolicyBrokenCount;};
499  inline unsigned long BadCount() {return iBadCount;};
500 
501  bool Init(OpProgress * const Prog);
502  // Generate all state information
503  void Update(OpProgress * const Prog = 0);
504 
505  pkgDepCache(pkgCache * const Cache,Policy * const Plcy = 0);
506  virtual ~~pkgDepCache();
507 
508  bool CheckConsistency(char const *const msgtag = "");
509 
510  protected:
511  // methods call by IsInstallOk
512  bool IsInstallOkMultiArchSameVersionSynced(PkgIterator const &Pkg,
513  bool const AutoInst, unsigned long const Depth, bool const FromUser);
514  bool IsInstallOkDependenciesSatisfiableByCandidates(PkgIterator const &Pkg,
515  bool const AutoInst, unsigned long const Depth, bool const FromUser);
516 
517  // methods call by IsDeleteOk
518  bool IsDeleteOkProtectInstallRequests(PkgIterator const &Pkg,
519  bool const rPurge, unsigned long const Depth, bool const FromUser);
520 
521  private:
522  struct Private;
523  Private *const d;
524 
525  APT_HIDDEN bool MarkInstall_StateChange(PkgIterator const &Pkg, bool AutoInst, bool FromUser);
526  APT_HIDDEN bool MarkInstall_DiscardInstall(PkgIterator const &Pkg);
527 
528  APT_HIDDEN void PerformDependencyPass(OpProgress * const Prog);
529 };
530 
531 #endif
static bool std::string const metaIndex const *const pkgAcqMetaClearSig *const pkgAcquire::Item *const I
return false
I Status
Simple subset of std::string_view from C++17.
Definition: string_view.h:27
match a string against a configurable list of patterns
bool FindB(const char *Name, bool const &Default=false) const
pkgCache::PkgIterator PkgIterator
Definition: pkgcache.h:829
pkgCache::VerIterator VerIterator
Definition: pkgcache.h:830
pkgCache::PkgFileIterator PkgFileIterator
Definition: pkgcache.h:835
pkgCache::DepIterator DepIterator
Definition: pkgcache.h:832
pkgCache::GrpIterator GrpIterator
Definition: pkgcache.h:828
pkgCache * Cache() const
Represents an active action group.
Definition: depcache.h:166
pkgDepCache & cache
Definition: depcache.h:168
APT_HIDDEN ActionGroup(const ActionGroup &other)
Returns true for packages matching a regular expression in APT::NeverAutoRemove.
Definition: depcache.h:203
bool InRootSet(const pkgCache::PkgIterator &pkg) APT_OVERRIDE
Definition: depcache.h:208
An arbitrary predicate on packages.
Definition: depcache.h:67
virtual bool InRootSet(const pkgCache::PkgIterator &)
Definition: depcache.h:69
virtual bool IsImportantDep(DepIterator const &Dep) const
Definition: depcache.cc:2145
virtual ~Policy()
Definition: depcache.h:287
unsigned long iDelCount
Definition: depcache.h:314
unsigned long iPolicyBrokenCount
Definition: depcache.h:317
PkgIterator FindPkg(APT::StringView Name)
Definition: depcache.h:358
void RemoveStates(const PkgIterator &Pkg)
Definition: depcache.h:348
bool DebugMarker
Definition: depcache.h:320
unsigned long iInstCount
Definition: depcache.h:313
pkgCache * Cache
Definition: depcache.h:305
unsigned long iKeepCount
Definition: depcache.h:315
unsigned char * DepState
Definition: depcache.h:307
unsigned long KeepCount()
Definition: depcache.h:495
Policy & GetPolicy()
Definition: depcache.h:365
void RemoveSizes(const PkgIterator &Pkg)
Definition: depcache.h:346
bool CheckDep(DepIterator const &Dep, int const Type)
Definition: depcache.h:328
unsigned long iBadCount
Definition: depcache.h:318
unsigned long long iDownloadSize
Definition: depcache.h:312
GrpIterator FindGrp(APT::StringView Name)
Definition: depcache.h:357
PkgIterator FindPkg(APT::StringView Name, APT::StringView Arch)
Definition: depcache.h:359
signed long long UsrSize()
Definition: depcache.h:492
unsigned long long DebSize()
Definition: depcache.h:493
unsigned long BadCount()
Definition: depcache.h:499
unsigned long iBrokenCount
Definition: depcache.h:316
unsigned long InstCount()
Definition: depcache.h:496
unsigned long DelCount()
Definition: depcache.h:494
PkgIterator PkgBegin()
Definition: depcache.h:356
signed long long iUsrSize
Definition: depcache.h:310
Policy * LocalPolicy
Definition: depcache.h:324
int group_level
Definition: depcache.h:298
pkgCache & GetCache()
Definition: depcache.h:361
unsigned long BrokenCount()
Definition: depcache.h:497
bool DebugAutoInstall
Definition: depcache.h:321
Policy * delLocalPolicy
Definition: depcache.h:323
unsigned long PolicyBrokenCount()
Definition: depcache.h:498
bool IsImportantDep(DepIterator Dep) const
Definition: depcache.h:364
StateCache * PkgState
Definition: depcache.h:306
GrpIterator GrpBegin()
Definition: depcache.h:355
Header & Head()
Definition: depcache.h:354
Private *const d
Definition: depcache.h:522
pkgVersioningSystem & VS()
Definition: depcache.h:362
Configuration * _config
#define APT_OVERRIDE
Definition: macros.h:111
#define APT_PUBLIC
Definition: macros.h:77
#define APT_HIDDEN
Definition: macros.h:78
PackageContainer< std::vector< pkgCache::PkgIterator > > PackageVector
Definition: cacheset.h:683
pkgCache - Structure definitions for the cache file
std::string CandidateVersion(pkgCacheFile *const Cache, pkgCache::PkgIterator const &Pkg)
static std::string GetCandidateVersion(pkgCacheFile &CacheFile, pkgCache::PkgIterator P)
bool Policy(CommandLine &CmdL)
information for a single version of a package
Definition: pkgcache.h:625
bool Held() const
Definition: depcache.h:255
bool Install() const
Definition: depcache.h:260
bool Upgradable() const
Definition: depcache.h:253
unsigned char Mode
Definition: depcache.h:240
bool NowBroken() const
Definition: depcache.h:256
bool InstPolicyBroken() const
Definition: depcache.h:259
bool NewInstall() const
Definition: depcache.h:247
bool Garbage
true if this package is unused and should be removed.
Definition: depcache.h:236
VerIterator InstVerIter(pkgCache &Cache)
Definition: depcache.h:262
bool Delete() const
Definition: depcache.h:248
VerIterator CandidateVerIter(pkgCache &Cache)
Definition: depcache.h:264
bool Protect() const
Definition: depcache.h:251
bool ReInstall() const
Definition: depcache.h:261
bool Marked
true if this package can be reached from the root set.
Definition: depcache.h:228
unsigned short Flags
Definition: depcache.h:224
const char * CandVersion
Definition: depcache.h:214
signed char Status
Definition: depcache.h:239
bool Downgrade() const
Definition: depcache.h:254
unsigned short iFlags
Definition: depcache.h:225
bool InstBroken() const
Definition: depcache.h:258
const char * CurVersion
Definition: depcache.h:215
Version * CandidateVer
Definition: depcache.h:218
bool NowPolicyBroken() const
Definition: depcache.h:257
bool Keep() const
Definition: depcache.h:250
unsigned char DepState
Definition: depcache.h:241
bool Purge() const
Definition: depcache.h:249
bool Upgrade() const
Definition: depcache.h:252