apt 3.0.3
commandline package manager
debsystem.h
1// -*- mode: cpp; mode: fold -*-
2// Description /*{{{*/
3/* ######################################################################
4
5 System - Debian version of the System Class
6
7 ##################################################################### */
8 /*}}}*/
9#ifndef PKGLIB_DEBSYSTEM_H
10#define PKGLIB_DEBSYSTEM_H
11
12#include <apt-pkg/pkgcache.h>
13#include <apt-pkg/pkgsystem.h>
14
15#include <vector>
16class Configuration;
17class pkgIndexFile;
20class pkgDepCache;
21
22
23class debSystem : public pkgSystem
24{
25 // private d-pointer
26 debSystemPrivate * const d;
27 APT_HIDDEN bool CheckUpdates();
28
29 public:
30 bool Lock(OpProgress *Progress) override;
31 bool UnLock(bool NoErrors = false) override;
32 pkgPackageManager *CreatePM(pkgDepCache *Cache) const override;
33 bool Initialize(Configuration &Cnf) override;
34 bool ArchiveSupported(const char *Type) override;
35 signed Score(Configuration const &Cnf) override;
36 bool AddStatusFiles(std::vector<pkgIndexFile *> &List) override;
37 bool FindIndex(pkgCache::PkgFileIterator File,
38 pkgIndexFile *&Found) const override;
39
40 debSystem();
41 ~debSystem() override;
42
43 APT_HIDDEN static std::string GetDpkgExecutable();
44 APT_HIDDEN static std::vector<std::string> GetDpkgBaseCommand();
45 APT_HIDDEN static void DpkgChrootDirectory();
46 APT_HIDDEN static std::string StripDpkgChrootDirectory(std::string const &File);
47 APT_HIDDEN static pid_t ExecDpkg(std::vector<std::string> const &sArgs, int * const inputFd, int * const outputFd, bool const DiscardOutput);
48 bool MultiArchSupported() const override;
49 static bool AssertFeature(std::string const &Feature);
50 std::vector<std::string> ArchitecturesSupported() const override;
51
52 bool LockInner(OpProgress *const Progress, int timeoutSec) override;
53 bool UnLockInner(bool NoErrors=false) override;
54 bool IsLocked() override;
55};
56
57extern debSystem debSys;
58
59#endif
Definition configuration.h:41
Definition progress.h:30
Definition debsystem.cc:47
Definition debsystem.h:24
bool IsLocked() override
checks if the system is currently locked
Definition debsystem.cc:218
std::vector< std::string > ArchitecturesSupported() const override
Definition debsystem.cc:531
bool MultiArchSupported() const override
Definition debsystem.cc:505
Definition depcache.h:63
Definition indexfile.h:103
Definition packagemanager.h:49
Definition pkgsystem.h:53
pkgCache - Structure definitions for the cache file