From 8d6d3f00b14217e69ecabd68379b1e29bf4a3ccd Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 15 Sep 2015 12:44:53 +0200 Subject: 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. --- apt-pkg/pkgsystem.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/pkgsystem.cc') 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 +#include #include #include @@ -46,5 +47,13 @@ APT_PURE pkgSystem *pkgSystem::GetSystem(const char *Label) return 0; } /*}}}*/ +bool pkgSystem::MultiArchSupported() const /*{{{*/ +{ + debSystem const * const deb = dynamic_cast(this); + if (deb != NULL) + return deb->SupportsMultiArch(); + return true; +} + /*}}}*/ pkgSystem::~pkgSystem() {} -- cgit v1.2.3