diff options
author | David Kalnischkies <david@kalnischkies.de> | 2016-07-28 11:43:36 +0200 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2016-08-10 23:51:34 +0200 |
commit | 4326680d2ed23d597f45ca8872a7054368560acc (patch) | |
tree | d355be7dc120d07771a774da88241f10150cc673 /apt-pkg/packagemanager.h | |
parent | 83e5cffc2015aa809acac84737756d292d7bf106 (diff) |
simulate all package manager actions explicitly
If a planner lets actions to be figured out by dpkg in pending calls
these actions aren't mentioned in a simulation. While that might be
a good thing for debugging, it would be a change in behavior and
especially if a planner avoids explicit removals could be confusing for
users. As such we perform the same 'trick' as in the dpkg implementation
by performing explicitly what would be done by the pending calls.
To save us some work and avoid desyncs we perform a layer violation by
using deb/ code in the generic simulation – and further we perform ugly
dynamic_cast to avoid breaking the ABI for nothing; aptitude is the only
other user of the simulation class according to codesearch.d.n and for
that our little trick works. It just isn't working if you happen to
extend pkgSimulate or otherwise manage to call the protected Go methods
directly – which isn't very realistic/practical.
Diffstat (limited to 'apt-pkg/packagemanager.h')
-rw-r--r-- | apt-pkg/packagemanager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/packagemanager.h b/apt-pkg/packagemanager.h index 25b6ee7c9..5046e2dc0 100644 --- a/apt-pkg/packagemanager.h +++ b/apt-pkg/packagemanager.h @@ -99,7 +99,7 @@ class pkgPackageManager : protected pkgCache::Namespace virtual bool Configure(PkgIterator /*Pkg*/) {return false;}; virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;}; virtual bool Go(APT::Progress::PackageManager * /*progress*/) {return true;}; - virtual bool Go(int /*statusFd*/=-1) {return true;}; + APT_DEPRECATED_MSG("Use overload with explicit progress manager") virtual bool Go(int /*statusFd*/=-1) {return true;}; virtual void Reset() {}; |