apt 3.0.3
commandline package manager
Classes | Public Member Functions | List of all members
StateChanges Class Reference

#include <apt-pkg/statechanges.h>

Classes

class  Private
 

Public Member Functions

 APT_GETTERSETTER (Hold)
 
 APT_GETTERSETTER (Unhold)
 
 APT_GETTERSETTER (Install)
 
 APT_GETTERSETTER (Remove)
 
 APT_GETTERSETTER (Purge)
 
APT::VersionVectorError ()
 
void clear ()
 
bool empty () const
 
bool Save (bool const DiscardOutput=false)
 
 StateChanges (StateChanges &&)
 
StateChangesoperator= (StateChanges &&)
 

Detailed Description

Simple wrapper class to abstract away the differences in storing different states in different places potentially in different versions.

Member Function Documentation

◆ Save()

bool Save ( bool const  DiscardOutput = false)

commit the staged changes to the database(s).

Makes the needed calls to store the requested states. After this call the state containers will hold only versions for which the storing operation succeeded. Versions where the storing operation failed are collected in Error(). Note that error is an upper bound as states are changed in batches so it isn't always clear which version triggered the failure exactly.

Parameters
DiscardOutputcontrols if stdout/stderr should be used by subprocesses for (detailed) error reporting if needed.
Returns
false if storing failed, true otherwise. Note that some states might be applied even if the whole operation failed.
Todo:
supported only since 1.17.7 in dpkg

References pkgSystem::MultiArchSupported().

Referenced by pkgDPkgPM::Go().


The documentation for this class was generated from the following files: