libapt-pkg-dev  v0.9.7.5ubuntu5.4
Debian+Ubuntu APT Package Management
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pkgDPkgPM Class Reference

#include <dpkgpm.h>

Inheritance diagram for pkgDPkgPM:
Collaboration diagram for pkgDPkgPM:

Classes

struct  DpkgState
 
struct  Item
 

Public Types

enum  OrderResult {
  Completed,
  Failed,
  Incomplete
}
 

Public Member Functions

 pkgDPkgPM (pkgDepCache *Cache)
 
virtual ~pkgDPkgPM ()
 
OrderResult DoInstall (int statusFd=-1)
 
OrderResult DoInstallPostFork (int statusFd=-1)
 
OrderResult DoInstallPreFork ()
 
bool FixMissing ()
 
bool GetArchives (pkgAcquire *Owner, pkgSourceList *Sources, pkgRecords *Recs)
 
std::set< std::string > GetDisappearedPackages ()
 returns all packages dpkg let disappear More...
 

Static Public Attributes

static bool SigINTStop
 

Protected Types

typedef pkgCache::Dep Dep
 
typedef pkgCache::DepIterator DepIterator
 
typedef pkgCache::DescIterator DescIterator
 
typedef pkgCache::Description Description
 
typedef pkgCache::Flag Flag
 
typedef pkgCache::GrpIterator GrpIterator
 
typedef pkgCache::Header Header
 
typedef pkgCache::Package Package
 
typedef pkgCache::PkgFileIterator PkgFileIterator
 
typedef pkgCache::PkgIterator PkgIterator
 
typedef pkgCache::PrvIterator PrvIterator
 
typedef pkgCache::VerFileIterator VerFileIterator
 
typedef pkgCache::VerIterator VerIterator
 
typedef pkgCache::Version Version
 

Protected Member Functions

bool CheckRConflicts (PkgIterator Pkg, DepIterator Dep, const char *Ver)
 
bool CloseLog ()
 
virtual bool Configure (PkgIterator Pkg)
 
bool ConfigureAll ()
 
bool CreateOrderList ()
 
bool DepAlwaysTrue (DepIterator D)
 
void DoDpkgStatusFd (int statusfd, int OutStatusFd)
 
void DoStdin (int master)
 
void DoTerminalPty (int master)
 
bool EarlyRemove (PkgIterator Pkg)
 
virtual bool Go (int StatusFd=-1)
 
void ImmediateAdd (PkgIterator P, bool UseInstallVer, unsigned const int &Depth=0)
 
virtual bool Install (PkgIterator Pkg, std::string File)
 
bool OpenLog ()
 
virtual OrderResult OrderInstall ()
 
void ProcessDpkgStatusLine (int OutStatusFd, char *line)
 
virtual bool Remove (PkgIterator Pkg, bool Purge=false)
 
virtual void Reset ()
 
bool RunScriptsWithPkgs (const char *Cnf)
 
bool SendV2Pkgs (FILE *F)
 
bool SmartConfigure (PkgIterator Pkg, int const Depth)
 
bool SmartRemove (PkgIterator Pkg)
 
bool SmartUnPack (PkgIterator Pkg)
 
bool SmartUnPack (PkgIterator Pkg, bool const Immediate, int const Depth)
 
void WriteApportReport (const char *pkgpath, const char *errormsg)
 
void WriteHistoryTag (std::string const &tag, std::string value)
 

Protected Attributes

pkgDepCacheCache
 
bool Debug
 
std::set< std::string > disappearedPkgs
 saves packages dpkg let disappear More...
 
std::string * FileNames
 
bool ImmConfigureAll
 
std::vector< ItemList
 
bool NoImmConfigure
 
std::map< std::string,
std::vector< struct DpkgState > > 
PackageOps
 
std::map< std::string,
unsigned int > 
PackageOpsDone
 
unsigned int PackagesDone
 
unsigned int PackagesTotal
 
int pkgFailures
 
OrderResult Res
 

Private Member Functions

void handleDisappearAction (std::string const &pkgname)
 record the disappear action and handle accordingly More...
 

Private Attributes

pkgDPkgPMPrivate * d
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
Completed 
Failed 
Incomplete 

Constructor & Destructor Documentation

pkgDPkgPM::pkgDPkgPM ( pkgDepCache Cache)
virtual pkgDPkgPM::~pkgDPkgPM ( )
virtual

Member Function Documentation

bool pkgPackageManager::CheckRConflicts ( PkgIterator  Pkg,
DepIterator  Dep,
const char *  Ver 
)
protectedinherited
bool pkgDPkgPM::CloseLog ( )
protected
virtual bool pkgDPkgPM::Configure ( PkgIterator  Pkg)
protectedvirtual

Reimplemented from pkgPackageManager.

bool pkgPackageManager::ConfigureAll ( )
protectedinherited
bool pkgPackageManager::CreateOrderList ( )
protectedinherited
bool pkgPackageManager::DepAlwaysTrue ( DepIterator  D)
protectedinherited
void pkgDPkgPM::DoDpkgStatusFd ( int  statusfd,
int  OutStatusFd 
)
protected
OrderResult pkgPackageManager::DoInstall ( int  statusFd = -1)
inherited
OrderResult pkgPackageManager::DoInstallPostFork ( int  statusFd = -1)
inherited
OrderResult pkgPackageManager::DoInstallPreFork ( )
inlineinherited

References pkgPackageManager::OrderInstall(), and pkgPackageManager::Res.

Here is the call graph for this function:

void pkgDPkgPM::DoStdin ( int  master)
protected
void pkgDPkgPM::DoTerminalPty ( int  master)
protected
bool pkgPackageManager::EarlyRemove ( PkgIterator  Pkg)
protectedinherited
bool pkgPackageManager::FixMissing ( )
inherited
bool pkgPackageManager::GetArchives ( pkgAcquire Owner,
pkgSourceList Sources,
pkgRecords Recs 
)
inherited
std::set<std::string> pkgPackageManager::GetDisappearedPackages ( )
inlineinherited

returns all packages dpkg let disappear

References pkgPackageManager::disappearedPkgs.

virtual bool pkgDPkgPM::Go ( int  StatusFd = -1)
protectedvirtual

Reimplemented from pkgPackageManager.

void pkgDPkgPM::handleDisappearAction ( std::string const &  pkgname)
private

record the disappear action and handle accordingly

dpkg let packages disappear then they have no files any longer and nothing depends on them. We need to collect this as dpkg as well as APT doesn't know beforehand that the package will disappear, so the only possible option is to tell the user afterwards about it. To enhance the experience we also try to forward the auto-install flag so the disappear-causer(s) are not autoremoved next time - for the transfer to happen the disappeared version needs to depend on the package the flag should be forwarded to and this package needs to declare a Replaces on the disappeared package.

Parameters
pkgnameName of the package that disappeared
void pkgPackageManager::ImmediateAdd ( PkgIterator  P,
bool  UseInstallVer,
unsigned const int &  Depth = 0 
)
protectedinherited
virtual bool pkgDPkgPM::Install ( PkgIterator  Pkg,
std::string  File 
)
protectedvirtual

Reimplemented from pkgPackageManager.

bool pkgDPkgPM::OpenLog ( )
protected
virtual OrderResult pkgPackageManager::OrderInstall ( )
protectedvirtualinherited

Referenced by pkgPackageManager::DoInstallPreFork().

Here is the caller graph for this function:

void pkgDPkgPM::ProcessDpkgStatusLine ( int  OutStatusFd,
char *  line 
)
protected
virtual bool pkgDPkgPM::Remove ( PkgIterator  Pkg,
bool  Purge = false 
)
protectedvirtual

Reimplemented from pkgPackageManager.

virtual void pkgDPkgPM::Reset ( )
protectedvirtual

Reimplemented from pkgPackageManager.

bool pkgDPkgPM::RunScriptsWithPkgs ( const char *  Cnf)
protected
bool pkgDPkgPM::SendV2Pkgs ( FILE *  F)
protected
bool pkgPackageManager::SmartConfigure ( PkgIterator  Pkg,
int const  Depth 
)
protectedinherited
bool pkgPackageManager::SmartRemove ( PkgIterator  Pkg)
protectedinherited
bool pkgPackageManager::SmartUnPack ( PkgIterator  Pkg)
protectedinherited
bool pkgPackageManager::SmartUnPack ( PkgIterator  Pkg,
bool const  Immediate,
int const  Depth 
)
protectedinherited
void pkgDPkgPM::WriteApportReport ( const char *  pkgpath,
const char *  errormsg 
)
protected
void pkgDPkgPM::WriteHistoryTag ( std::string const &  tag,
std::string  value 
)
protected

Member Data Documentation

pkgDepCache& pkgPackageManager::Cache
protectedinherited
pkgDPkgPMPrivate* pkgDPkgPM::d
private
bool pkgPackageManager::Debug
protectedinherited
std::set<std::string> pkgPackageManager::disappearedPkgs
protectedinherited

saves packages dpkg let disappear

This way APT can retreat from trying to configure these packages later on and a frontend can choose to display a notice to inform the user about these disappears.

Referenced by pkgPackageManager::GetDisappearedPackages().

std::string* pkgPackageManager::FileNames
protectedinherited
bool pkgPackageManager::ImmConfigureAll
protectedinherited
std::vector<Item> pkgDPkgPM::List
protected
bool pkgPackageManager::NoImmConfigure
protectedinherited
std::map<std::string,std::vector<struct DpkgState> > pkgDPkgPM::PackageOps
protected
std::map<std::string,unsigned int> pkgDPkgPM::PackageOpsDone
protected
unsigned int pkgDPkgPM::PackagesDone
protected
unsigned int pkgDPkgPM::PackagesTotal
protected
int pkgDPkgPM::pkgFailures
protected
OrderResult pkgPackageManager::Res
protectedinherited
bool pkgPackageManager::SigINTStop
staticinherited

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