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)  

debSystem Class Reference

#include <debsystem.h>

Inheritance diagram for debSystem:
[legend]
Collaboration diagram for debSystem:
[legend]

Public Member Functions

virtual bool Lock (OpProgress *const Progress) APT_OVERRIDE
 
virtual bool UnLock (bool NoErrors=false) APT_OVERRIDE
 
virtual pkgPackageManagerCreatePM (pkgDepCache *Cache) const APT_OVERRIDE
 
virtual bool Initialize (Configuration &Cnf) APT_OVERRIDE
 
virtual bool ArchiveSupported (const char *Type) APT_OVERRIDE
 
virtual signed Score (Configuration const &Cnf) APT_OVERRIDE
 
virtual bool AddStatusFiles (std::vector< pkgIndexFile * > &List) APT_OVERRIDE
 
virtual bool FindIndex (pkgCache::PkgFileIterator File, pkgIndexFile *&Found) const APT_OVERRIDE
 
 debSystem ()
 
virtual ~debSystem ()
 
bool MultiArchSupported () const override
 
std::vector< std::string > ArchitecturesSupported () const override
 
bool LockInner (OpProgress *const Progress, int timeoutSec) override
 
bool UnLockInner (bool NoErrors=false) override
 
bool IsLocked () override
 checks if the system is currently locked More...
 
- Public Member Functions inherited from pkgSystem
APT_HIDDEN void SetVersionMapping (map_id_t const in, map_id_t const out)
 
APT_HIDDEN map_id_t GetVersionMapping (map_id_t const in) const
 
 pkgSystem (char const *const Label, pkgVersioningSystem *const VS)
 
virtual ~pkgSystem ()
 

Static Public Member Functions

static APT_HIDDEN std::string GetDpkgExecutable ()
 
static APT_HIDDEN std::vector< std::string > GetDpkgBaseCommand ()
 
static APT_HIDDEN void DpkgChrootDirectory ()
 
static APT_HIDDEN pid_t ExecDpkg (std::vector< std::string > const &sArgs, int *const inputFd, int *const outputFd, bool const DiscardOutput)
 
static bool AssertFeature (std::string const &Feature)
 
- Static Public Member Functions inherited from pkgSystem
static pkgSystemGetSystem (const char *Label)
 

Private Member Functions

APT_HIDDEN bool CheckUpdates ()
 

Private Attributes

debSystemPrivate *const d
 

Additional Inherited Members

- Public Attributes inherited from pkgSystem
const char *const Label
 
pkgVersioningSystem *const VS
 
- Static Public Attributes inherited from pkgSystem
static pkgSystem ** GlobalList = SysList
 
static unsigned long GlobalListLen = 0
 

Detailed Description

Definition at line 23 of file debsystem.h.

Constructor & Destructor Documentation

◆ debSystem()

debSystem ( )

Definition at line 63 of file debsystem.cc.

◆ ~debSystem()

~debSystem ( )
virtual

Definition at line 70 of file debsystem.cc.

References d, and debSystemPrivate::StatusFile.

Member Function Documentation

◆ AddStatusFiles()

bool AddStatusFiles ( std::vector< pkgIndexFile * > &  List)
virtual

Implements pkgSystem.

Definition at line 336 of file debsystem.cc.

References _config, d, Configuration::FindFile(), and debSystemPrivate::StatusFile.

◆ ArchitecturesSupported()

std::vector< std::string > ArchitecturesSupported ( ) const
overridevirtual

architectures supported by this system

A MultiArch capable system might be configured to use this capability.

Returns
a list of all architectures (native + foreign) configured for on this system (aka: which can be installed without force)

Implements pkgSystem.

Definition at line 493 of file debsystem.cc.

References _config, ExecDpkg(), ExecWait(), FILE, Configuration::Find(), GetDpkgBaseCommand(), and isspace_ascii().

◆ ArchiveSupported()

APT_PURE bool ArchiveSupported ( const char *  Type)
virtual

Implements pkgSystem.

Definition at line 310 of file debsystem.cc.

◆ AssertFeature()

bool AssertFeature ( std::string const &  Feature)
static

Definition at line 472 of file debsystem.cc.

References ExecDpkg(), GetDpkgBaseCommand(), and Status.

Referenced by pkgDPkgPM::Go(), and MultiArchSupported().

◆ CheckUpdates()

bool CheckUpdates ( )
private

Definition at line 227 of file debsystem.cc.

References _config, DIR, Configuration::FindFile(), flNotFile(), and I.

Referenced by Lock().

◆ CreatePM()

pkgPackageManager * CreatePM ( pkgDepCache Cache) const
virtual

Implements pkgSystem.

Definition at line 261 of file debsystem.cc.

◆ DpkgChrootDirectory()

void DpkgChrootDirectory ( )
static

Definition at line 395 of file debsystem.cc.

References _config, and Configuration::FindDir().

Referenced by ExecDpkg(), pkgDPkgPM::Go(), and pkgDPkgPM::RunScriptsWithPkgs().

◆ ExecDpkg()

pid_t ExecDpkg ( std::vector< std::string > const &  sArgs,
int *const  inputFd,
int *const  outputFd,
bool const  DiscardOutput 
)
static

◆ FindIndex()

bool FindIndex ( pkgCache::PkgFileIterator  File,
pkgIndexFile *&  Found 
) const
virtual

Implements pkgSystem.

Definition at line 347 of file debsystem.cc.

References d, pkgDebianIndexFile::FindInCache(), and debSystemPrivate::StatusFile.

◆ GetDpkgBaseCommand()

◆ GetDpkgExecutable()

std::string GetDpkgExecutable ( )
static

Definition at line 362 of file debsystem.cc.

References _config, Configuration::Find(), and Configuration::FindDir().

Referenced by GetDpkgBaseCommand().

◆ Initialize()

bool Initialize ( Configuration Cnf)
virtual

◆ IsLocked()

bool IsLocked ( )
overridevirtual

checks if the system is currently locked

Implements pkgSystem.

Definition at line 218 of file debsystem.cc.

References d, and debSystemPrivate::LockCount.

◆ Lock()

◆ LockInner()

bool LockInner ( OpProgress *const  Progress,
int  timeoutSec 
)
overridevirtual

Implements pkgSystem.

Definition at line 173 of file debsystem.cc.

References _config, d, Configuration::FindFile(), flNotFile(), GetLockMaybeWait(), and debSystemPrivate::LockFD.

Referenced by Lock().

◆ MultiArchSupported()

bool MultiArchSupported ( ) const
overridevirtual

does this system has support for MultiArch?

Systems supporting only single arch (not systems which are single arch) are considered legacy systems and support for it will likely degrade over time.

The default implementation returns always true.

Returns
true if the system supports MultiArch, false if not.

Implements pkgSystem.

Definition at line 467 of file debsystem.cc.

References AssertFeature().

◆ Score()

signed Score ( Configuration const &  Cnf)
virtual

Reimplemented from pkgSystem.

Definition at line 321 of file debsystem.cc.

References FileExists(), Configuration::Find(), Configuration::FindFile(), and getDpkgStatusLocation().

◆ UnLock()

bool UnLock ( bool  NoErrors = false)
virtual

◆ UnLockInner()

bool UnLockInner ( bool  NoErrors = false)
overridevirtual

Implements pkgSystem.

Definition at line 208 of file debsystem.cc.

References d, and debSystemPrivate::LockFD.

Member Data Documentation

◆ d


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