diff options
| author | Julian Andres Klode <jak@debian.org> | 2026-05-01 16:39:28 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-05-01 16:39:28 +0000 |
| commit | f54be3edba84a7bebd86e6262463a04a749f18e6 (patch) | |
| tree | ee7aa9cf7cb57a60772f2369eee048bc19174bf4 | |
| parent | 08c80e710f913ab56891d34c22dc93f890125952 (diff) | |
| parent | 186ea76de09ef2f298f62d518a57d0567d2c0075 (diff) | |
Merge branch 'avoid-abi' into 'main'
Avoid ABI break for transaction cancellation
See merge request apt-team/apt!578
| -rw-r--r-- | apt-pkg/acquire-item.cc | 4 | ||||
| -rw-r--r-- | apt-pkg/acquire-item.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index b77bccc9d..55bb11ae4 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -872,6 +872,8 @@ std::string pkgAcquire::Item::ShortDesc() const /*{{{*/ /*}}}*/ void pkgAcquire::Item::Cancelled() /*{{{*/ { + if (auto Self = dynamic_cast<pkgAcqMetaClearSig*>(this)) + Self->DoCancelled(); } /*}}}*/ void pkgAcquire::Item::Finished() /*{{{*/ @@ -2014,7 +2016,7 @@ string pkgAcqMetaClearSig::Custom600Headers() const return Header; } /*}}}*/ -void pkgAcqMetaClearSig::Cancelled() /*{{{*/ +void pkgAcqMetaClearSig::DoCancelled() /*{{{*/ { if (TransactionManager->State == TransactionStarted) TransactionManager->AbortTransaction(); diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index 1182e415e..8a85d20ba 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -254,7 +254,7 @@ class APT_PUBLIC pkgAcquire::Item : public WeakPointable /*{{{*/ virtual std::string ShortDesc() const; /** \brief Invoked by the worker when the download is cancelled before completion. */ - virtual void Cancelled(); + APT_HIDDEN void Cancelled(); /** \brief Invoked by the worker when the download is completely done. */ virtual void Finished(); @@ -578,7 +578,7 @@ class APT_HIDDEN pkgAcqMetaClearSig final : public pkgAcqMetaIndex bool VerifyDone(std::string const &Message, pkgAcquire::MethodConfig const *Cnf) override; void Done(std::string const &Message, HashStringList const &Hashes, pkgAcquire::MethodConfig const *Cnf) override; - void Cancelled() override; + void DoCancelled(); void Finished() override; /** \brief Starts downloading the individual index files. |
