diff options
author | Julian Andres Klode <jak@debian.org> | 2018-08-07 13:51:13 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2018-08-07 13:51:13 +0000 |
commit | e165588b0b9bc7c484c91e324b6b9418b0a29457 (patch) | |
tree | 0e20b60cfc4e79ceebe916cef692ffa8cf7ec875 /apt-pkg/pkgsystem.cc | |
parent | 1ff389a5053e9ece91db8199afdcec16090a76b0 (diff) | |
parent | c2c8b4787b0882234ba2772ec7513afbf97b563a (diff) |
Merge branch 'bugfix/big-lock' into 'master'
Add support for dpkg frontend lock
See merge request apt-team/apt!11
Diffstat (limited to 'apt-pkg/pkgsystem.cc')
-rw-r--r-- | apt-pkg/pkgsystem.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apt-pkg/pkgsystem.cc b/apt-pkg/pkgsystem.cc index efbaddcdb..eaa3f5ab7 100644 --- a/apt-pkg/pkgsystem.cc +++ b/apt-pkg/pkgsystem.cc @@ -12,6 +12,7 @@ #include <config.h> #include <apt-pkg/debsystem.h> +#include <apt-pkg/error.h> #include <apt-pkg/macros.h> #include <apt-pkg/pkgsystem.h> @@ -85,4 +86,28 @@ map_id_t pkgSystem::GetVersionMapping(map_id_t const in) const } /*}}}*/ +bool pkgSystem::LockInner() /*{{{*/ +{ + debSystem * const deb = dynamic_cast<debSystem *>(this); + if (deb != NULL) + return deb->LockInner(); + return _error->Error("LockInner is not implemented"); +} + /*}}}*/ +bool pkgSystem::UnLockInner(bool NoErrors) /*{{{*/ +{ + debSystem * const deb = dynamic_cast<debSystem *>(this); + if (deb != NULL) + return deb->UnLockInner(NoErrors); + return _error->Error("UnLockInner is not implemented"); +} + /*}}}*/ +bool pkgSystem::IsLocked() /*{{{*/ +{ + debSystem * const deb = dynamic_cast<debSystem *>(this); + if (deb != NULL) + return deb->IsLocked(); + return true; +} + /*}}}*/ pkgSystem::~pkgSystem() {} |