summaryrefslogtreecommitdiff
path: root/apt-pkg/deb
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-02-26 14:29:06 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2020-02-26 14:30:03 +0100
commitda7de99f8473ae0ac90c90fad3eee80f5f72889a (patch)
tree795744c3038a9d6e9c7cae5ef69e4095c0d1fc94 /apt-pkg/deb
parentd77c1c7db760ae21d703b8b0f129379e54918bf7 (diff)
pkgsystem: Drop more virtual workaround shenanigans
Diffstat (limited to 'apt-pkg/deb')
-rw-r--r--apt-pkg/deb/debsystem.cc4
-rw-r--r--apt-pkg/deb/debsystem.h10
-rw-r--r--apt-pkg/deb/dpkgpm.cc5
3 files changed, 9 insertions, 10 deletions
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)