summaryrefslogtreecommitdiff
path: root/apt-pkg/pkgsystem.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-09-15 12:44:53 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-11-04 15:02:36 +0100
commit8d6d3f00b14217e69ecabd68379b1e29bf4a3ccd (patch)
treeb72f8bb2b10b46ad2b81acce2128d07ed4668e4a /apt-pkg/pkgsystem.cc
parentfa74b4ece008f6600d530e28a609f31312c8c864 (diff)
implement a public pkgSystem::MultiArchSupported
Some codepaths need to check if the system (in our case usually dpkg) supports MultiArch or not. We had copy-pasted the check so far into these paths, but having it as a system check is better for reusability.
Diffstat (limited to 'apt-pkg/pkgsystem.cc')
-rw-r--r--apt-pkg/pkgsystem.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/apt-pkg/pkgsystem.cc b/apt-pkg/pkgsystem.cc
index a6b61e655..2a0fc9d3b 100644
--- a/apt-pkg/pkgsystem.cc
+++ b/apt-pkg/pkgsystem.cc
@@ -12,6 +12,7 @@
// Include Files /*{{{*/
#include<config.h>
+#include <apt-pkg/debsystem.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/macros.h>
@@ -46,5 +47,13 @@ APT_PURE pkgSystem *pkgSystem::GetSystem(const char *Label)
return 0;
}
/*}}}*/
+bool pkgSystem::MultiArchSupported() const /*{{{*/
+{
+ debSystem const * const deb = dynamic_cast<debSystem const *>(this);
+ if (deb != NULL)
+ return deb->SupportsMultiArch();
+ return true;
+}
+ /*}}}*/
pkgSystem::~pkgSystem() {}