summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2020-02-26 14:51:05 +0000
committerJulian Andres Klode <jak@debian.org>2020-02-26 14:51:05 +0000
commita096b580694cb36f29cdbce8f1db797a08e36709 (patch)
tree8a1bf6106868761042c80e04fdeff1077779ac18 /apt-pkg/deb
parentb31040e9c1441a2a7296ce3ff12f5052fc522366 (diff)
parentda01dabb86396a1391f081fa54a806e2d7b62133 (diff)
Merge branch 'pu/cleanups' into 'master'
Cleanup ABI - make stuff virtual, etc See merge request apt-team/apt!106
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debindexfile.cc2
-rw-r--r--apt-pkg/deb/debindexfile.h3
-rw-r--r--apt-pkg/deb/debmetaindex.cc10
-rw-r--r--apt-pkg/deb/debmetaindex.h8
-rw-r--r--apt-pkg/deb/debsystem.cc4
-rw-r--r--apt-pkg/deb/debsystem.h10
-rw-r--r--apt-pkg/deb/dpkgpm.cc5
7 files changed, 20 insertions, 22 deletions
diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc
index e4ceebff2..43317d314 100644
--- a/apt-pkg/deb/debindexfile.cc
+++ b/apt-pkg/deb/debindexfile.cc
@@ -246,7 +246,7 @@ pkgCache::PkgFileIterator debDebPkgFileIndex::FindInCache(pkgCache &Cache) const
return File;
}
-std::string debDebPkgFileIndex::ArchiveInfo_impl(pkgCache::VerIterator const &Ver) const
+std::string debDebPkgFileIndex::ArchiveInfo(pkgCache::VerIterator const &Ver) const
{
std::string Res = IndexFileName() + " ";
Res.append(Ver.ParentPkg().Name()).append(" ");
diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h
index 222fed229..3ef9f6b0c 100644
--- a/apt-pkg/deb/debindexfile.h
+++ b/apt-pkg/deb/debindexfile.h
@@ -144,8 +144,7 @@ public:
explicit debDebPkgFileIndex(std::string const &DebFile);
virtual ~debDebPkgFileIndex();
- //FIXME: use proper virtual-handling on next ABI break
- APT_HIDDEN std::string ArchiveInfo_impl(pkgCache::VerIterator const &Ver) const;
+ std::string ArchiveInfo(pkgCache::VerIterator const &Ver) const override;
};
class debDscFileIndex : public pkgDebianIndexRealFile
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index 2c0ab1d0d..a72f6d055 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -447,12 +447,12 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
// FIXME: find better tag name
SupportsAcquireByHash = Section.FindB("Acquire-By-Hash", false);
- SetOrigin(Section.FindS("Origin"));
- SetLabel(Section.FindS("Label"));
- SetVersion(Section.FindS("Version"));
+ Origin = Section.FindS("Origin");
+ Label = Section.FindS("Label");
+ Version = Section.FindS("Version");
Suite = Section.FindS("Suite");
Codename = Section.FindS("Codename");
- SetReleaseNotes(Section.FindS("Release-Notes"));
+ ReleaseNotes = Section.FindS("Release-Notes");
{
std::string const archs = Section.FindS("Architectures");
if (archs.empty() == false)
@@ -484,7 +484,7 @@ bool debReleaseIndex::Load(std::string const &Filename, std::string * const Erro
else
defaultpin = 1;
}
- SetDefaultPin(defaultpin);
+ DefaultPin = defaultpin;
}
bool FoundHashSum = false;
diff --git a/apt-pkg/deb/debmetaindex.h b/apt-pkg/deb/debmetaindex.h
index 0038f52f9..5576ff809 100644
--- a/apt-pkg/deb/debmetaindex.h
+++ b/apt-pkg/deb/debmetaindex.h
@@ -55,11 +55,11 @@ class APT_HIDDEN debReleaseIndex : public metaIndex
std::map<std::string, std::string> GetReleaseOptions();
virtual bool IsTrusted() const APT_OVERRIDE;
- bool IsArchitectureSupported(std::string const &arch) const;
- bool IsArchitectureAllSupportedFor(IndexTarget const &target) const;
- bool HasSupportForComponent(std::string const &component) const;
+ bool IsArchitectureSupported(std::string const &arch) const override;
+ bool IsArchitectureAllSupportedFor(IndexTarget const &target) const override;
+ bool HasSupportForComponent(std::string const &component) const override;
- APT_PURE time_t GetNotBefore() const;
+ APT_PURE time_t GetNotBefore() const override;
void AddComponent(std::string const &sourcesEntry,
bool const isSrc, std::string const &Name,
diff --git a/apt-pkg/deb/debsystem.cc b/apt-pkg/deb/debsystem.cc
index 0c7e9ff39..225761e9d 100644
--- a/apt-pkg/deb/debsystem.cc
+++ b/apt-pkg/deb/debsystem.cc
@@ -419,7 +419,7 @@ pid_t debSystem::ExecDpkg(std::vector<std::string> const &sArgs, int * const inp
return dpkg;
}
/*}}}*/
-bool debSystem::SupportsMultiArch() /*{{{*/
+bool debSystem::MultiArchSupported() const /*{{{*/
{
std::vector<std::string> Args = GetDpkgBaseCommand();
Args.push_back("--assert-multi-arch");
@@ -440,7 +440,7 @@ bool debSystem::SupportsMultiArch() /*{{{*/
return false;
}
/*}}}*/
-std::vector<std::string> debSystem::SupportedArchitectures() /*{{{*/
+std::vector<std::string> debSystem::ArchitecturesSupported() const /*{{{*/
{
std::vector<std::string> archs;
{
diff --git a/apt-pkg/deb/debsystem.h b/apt-pkg/deb/debsystem.h
index 3a308fb1c..a331af351 100644
--- a/apt-pkg/deb/debsystem.h
+++ b/apt-pkg/deb/debsystem.h
@@ -45,12 +45,12 @@ class debSystem : public pkgSystem
APT_HIDDEN static std::vector<std::string> GetDpkgBaseCommand();
APT_HIDDEN static void DpkgChrootDirectory();
APT_HIDDEN static pid_t ExecDpkg(std::vector<std::string> const &sArgs, int * const inputFd, int * const outputFd, bool const DiscardOutput);
- APT_HIDDEN static bool SupportsMultiArch();
- APT_HIDDEN static std::vector<std::string> SupportedArchitectures();
+ bool MultiArchSupported() const override;
+ std::vector<std::string> ArchitecturesSupported() const override;
- APT_HIDDEN bool LockInner();
- APT_HIDDEN bool UnLockInner(bool NoErrors=false);
- APT_HIDDEN bool IsLocked();
+ bool LockInner() override;
+ bool UnLockInner(bool NoErrors=false) override;
+ bool IsLocked() override;
};
extern debSystem debSys;
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index 0b807d668..ef73881c8 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -1711,7 +1711,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
// create log
OpenLog();
- bool dpkgMultiArch = debSystem::SupportsMultiArch();
+ bool dpkgMultiArch = _system->MultiArchSupported();
// start pty magic before the loop
StartPtyMagic();
@@ -2014,8 +2014,7 @@ bool pkgDPkgPM::Go(APT::Progress::PackageManager *progress)
else
setenv("DPKG_COLORS", "never", 0);
- if (dynamic_cast<debSystem*>(_system) != nullptr
- && dynamic_cast<debSystem*>(_system)->IsLocked() == true) {
+ if (_system->IsLocked() == true) {
setenv("DPKG_FRONTEND_LOCKED", "true", 1);
}
if (_config->Find("DPkg::Path", "").empty() == false)