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)  

private-install.cc File Reference
#include <config.h>
#include <apt-pkg/acquire-item.h>
#include <apt-pkg/acquire.h>
#include <apt-pkg/algorithms.h>
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/cmndline.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/depcache.h>
#include <apt-pkg/error.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/install-progress.h>
#include <apt-pkg/macros.h>
#include <apt-pkg/packagemanager.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/pkgrecords.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/prettyprinters.h>
#include <apt-pkg/strutl.h>
#include <apt-pkg/upgrade.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <stdlib.h>
#include <string.h>
#include <apt-private/acqprogress.h>
#include <apt-private/private-cachefile.h>
#include <apt-private/private-cacheset.h>
#include <apt-private/private-download.h>
#include <apt-private/private-install.h>
#include <apt-private/private-json-hooks.h>
#include <apt-private/private-output.h>
#include <apti18n.h>
Include dependency graph for private-install.cc:

Go to the source code of this file.

Classes

struct  PkgIsExtraInstalled
 

Functions

bool CheckNothingBroken (CacheFile &Cache)
 
static void RemoveDownloadNeedingItemsFromFetcher (pkgAcquire &Fetcher, bool &Transient)
 
bool InstallPackages (CacheFile &Cache, bool ShwKept, bool Ask, bool Safety)
 
bool DoAutomaticRemove (CacheFile &Cache)
 
bool DoCacheManipulationFromCommandLine (CommandLine &CmdL, CacheFile &Cache, int UpgradeMode)
 
bool DoCacheManipulationFromCommandLine (CommandLine &CmdL, std::vector< PseudoPkg > &VolatileCmdL, CacheFile &Cache, int UpgradeMode)
 
bool DoCacheManipulationFromCommandLine (CommandLine &CmdL, std::vector< PseudoPkg > &VolatileCmdL, CacheFile &Cache, std::map< unsigned short, APT::VersionSet > &verset, int UpgradeMode, std::set< std::string > &UnknownPackages)
 
bool AddVolatileSourceFile (pkgSourceList *const SL, PseudoPkg &&pkg, std::vector< PseudoPkg > &VolatileCmdL)
 
bool AddVolatileBinaryFile (pkgSourceList *const SL, PseudoPkg &&pkg, std::vector< PseudoPkg > &VolatileCmdL)
 
static bool AddIfVolatile (pkgSourceList *const SL, std::vector< PseudoPkg > &VolatileCmdL, bool(*Add)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &), char const *const I, std::string const &pseudoArch)
 
std::vector< PseudoPkgGetAllPackagesAsPseudo (pkgSourceList *const SL, CommandLine &CmdL, bool(*Add)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &), std::string const &pseudoArch)
 
std::vector< PseudoPkgGetPseudoPackages (pkgSourceList *const SL, CommandLine &CmdL, bool(*Add)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &), std::string const &pseudoArch)
 
bool DoInstall (CommandLine &CmdL)
 

Variables

static const unsigned short MOD_REMOVE = 1
 
static const unsigned short MOD_INSTALL = 2
 

Function Documentation

◆ AddIfVolatile()

static bool AddIfVolatile ( pkgSourceList *const  SL,
std::vector< PseudoPkg > &  VolatileCmdL,
bool(*)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &)  Add,
char const *const  I,
std::string const &  pseudoArch 
)
static

◆ AddVolatileBinaryFile()

bool AddVolatileBinaryFile ( pkgSourceList *const  SL,
PseudoPkg &&  pkg,
std::vector< PseudoPkg > &  VolatileCmdL 
)

Definition at line 745 of file private-install.cc.

References pkgSourceList::AddVolatileFile(), and flExtension().

Referenced by DoInstall(), ShowPackage(), and UpgradeHelper().

◆ AddVolatileSourceFile()

bool AddVolatileSourceFile ( pkgSourceList *const  SL,
PseudoPkg &&  pkg,
std::vector< PseudoPkg > &  VolatileCmdL 
)

Definition at line 733 of file private-install.cc.

References pkgSourceList::AddVolatileFile(), FileExists(), and flExtension().

Referenced by DoBuildDep().

◆ CheckNothingBroken()

bool CheckNothingBroken ( CacheFile Cache)

Definition at line 44 of file private-install.cc.

References _config, c1out, Configuration::Find(), and ShowBroken().

Referenced by DoBuildDep(), and DoCacheManipulationFromCommandLine().

◆ DoAutomaticRemove()

◆ DoCacheManipulationFromCommandLine() [1/3]

bool DoCacheManipulationFromCommandLine ( CommandLine CmdL,
CacheFile Cache,
int  UpgradeMode 
)

◆ DoCacheManipulationFromCommandLine() [2/3]

bool DoCacheManipulationFromCommandLine ( CommandLine CmdL,
std::vector< PseudoPkg > &  VolatileCmdL,
CacheFile Cache,
int  UpgradeMode 
)

Definition at line 581 of file private-install.cc.

References DoCacheManipulationFromCommandLine().

◆ DoCacheManipulationFromCommandLine() [3/3]

◆ DoInstall()

◆ GetAllPackagesAsPseudo()

std::vector<PseudoPkg> GetAllPackagesAsPseudo ( pkgSourceList *const  SL,
CommandLine CmdL,
bool(*)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &)  Add,
std::string const &  pseudoArch 
)

Definition at line 789 of file private-install.cc.

References CommandLine::FileList, CommandLine::FileSize(), and I.

Referenced by ShowPackage().

◆ GetPseudoPackages()

std::vector<PseudoPkg> GetPseudoPackages ( pkgSourceList *const  SL,
CommandLine CmdL,
bool(*)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &)  Add,
std::string const &  pseudoArch 
)

Definition at line 799 of file private-install.cc.

References CommandLine::FileList, CommandLine::FileSize(), and I.

Referenced by DoBuildDep(), DoInstall(), and UpgradeHelper().

◆ InstallPackages()

◆ RemoveDownloadNeedingItemsFromFetcher()

static void RemoveDownloadNeedingItemsFromFetcher ( pkgAcquire Fetcher,
bool &  Transient 
)
static

Definition at line 83 of file private-install.cc.

References I, pkgAcquire::ItemsBegin(), and pkgAcquire::ItemsEnd().

Referenced by InstallPackages().

Variable Documentation

◆ MOD_INSTALL

const unsigned short MOD_INSTALL = 2
static

Definition at line 574 of file private-install.cc.

Referenced by DoCacheManipulationFromCommandLine(), and DoInstall().

◆ MOD_REMOVE

const unsigned short MOD_REMOVE = 1
static

Definition at line 573 of file private-install.cc.

Referenced by DoCacheManipulationFromCommandLine().