|
libzypp 17.38.6
|
Component managing package-level policies: retracted packages, PTF tracking, and the "reboot needed" hint. More...
#include <zypp/ng/sat/components/packagepolicycomponent.h>

Public Member Functions | |
| PackagePolicyComponent () | |
| ~PackagePolicyComponent () override=default | |
| PreparedStage | stage () const override |
| void | attach (Pool &p) override |
| called when the component is attached to a pool | |
| void | prepare (PreparedPool &pp) override |
| Called by Pool::prepare() — evaluates all specs against the prepared pool. | |
| void | onInvalidate (Pool &pool, PoolInvalidation invalidation) override |
| Called when pool content changes — resets all evaluated forms. | |
| void | onReset (Pool &pool) override |
| Called on full pool reset — resets all evaluated forms. | |
Retracted packages | |
| bool | isRetracted (const Solvable &solv_r) const |
PTF (Program Temporary Fix) | |
| bool | isPtfMaster (const Solvable &solv_r) const |
| bool | isPtfPackage (const Solvable &solv_r) const |
| Public Member Functions inherited from zyppng::sat::IPreparedPoolComponent | |
| virtual int | priority () const |
| Fine-grained ordering within a stage. | |
| Public Member Functions inherited from zyppng::sat::detail::IBasicPoolComponent | |
| virtual void | checkDirty (Pool &) |
| Probe external state. | |
| virtual void | onRepoAdded (Pool &, RepoIdType) |
| virtual void | onRepoRemoved (Pool &, RepoIdType) |
| virtual | ~IBasicPoolComponent ()=default |
| IBasicPoolComponent ()=default | |
| IBasicPoolComponent (const IBasicPoolComponent &)=delete | |
| IBasicPoolComponent (IBasicPoolComponent &&)=delete | |
| IBasicPoolComponent & | operator= (const IBasicPoolComponent &)=delete |
| IBasicPoolComponent & | operator= (IBasicPoolComponent &&)=delete |
Reboot-needed hint | |
| Pool * | _pool = nullptr |
| SolvableSpec | _retractedSpec |
| hardwired: provides retracted-patch-package() | |
| SolvableSpec | _ptfMasterSpec |
| hardwired: provides ptf() | |
| SolvableSpec | _ptfPackageSpec |
| hardwired: provides ptf-package() | |
| SolvableSpec | _needrebootSpec |
| user-supplied | |
| std::optional< EvaluatedSolvableSpec > | _retractedEval |
| std::optional< EvaluatedSolvableSpec > | _ptfMasterEval |
| std::optional< EvaluatedSolvableSpec > | _ptfPackageEval |
| std::optional< EvaluatedSolvableSpec > | _needrebootEval |
| void | setNeedrebootSpec (SolvableSpec spec) |
| Replace the reboot-needed spec. | |
| bool | isNeedreboot (const Solvable &solv_r) const |
Component managing package-level policies: retracted packages, PTF tracking, and the "reboot needed" hint.
setNeedrebootSpec(). The retracted/PTF specs are hardwired.std::optional<EvaluatedSolvableSpec> that is constructed in prepare(Pool&) and reset to nullopt by onInvalidate(). Once evaluated, contains() is O(1) with no pool access.prepare(Pool&) is called by the Pool during its own prepare() cycle. This is where the specs are expanded and the evaluated forms constructed.onInvalidate() resets the evaluated forms so they are rebuilt on the next prepare() call.zypp::sat::Pool: "retracted-patch-package()", "ptf()", "ptf-package()". Definition at line 47 of file packagepolicycomponent.h.
| zyppng::sat::PackagePolicyComponent::PackagePolicyComponent | ( | ) |
Definition at line 21 of file packagepolicycomponent.cc.
|
overridedefault |
|
inlineoverridevirtual |
Reimplemented from zyppng::sat::IPreparedPoolComponent.
Definition at line 53 of file packagepolicycomponent.h.
|
overridevirtual |
called when the component is attached to a pool
Reimplemented from zyppng::sat::IPreparedPoolComponent.
Definition at line 40 of file packagepolicycomponent.cc.
|
overridevirtual |
Called by Pool::prepare() — evaluates all specs against the prepared pool.
Reimplemented from zyppng::sat::IPreparedPoolComponent.
Definition at line 46 of file packagepolicycomponent.cc.
|
overridevirtual |
Called when pool content changes — resets all evaluated forms.
Reimplemented from zyppng::sat::detail::IBasicPoolComponent.
Definition at line 54 of file packagepolicycomponent.cc.
|
overridevirtual |
Called on full pool reset — resets all evaluated forms.
Reimplemented from zyppng::sat::detail::IBasicPoolComponent.
Definition at line 66 of file packagepolicycomponent.cc.
Definition at line 78 of file packagepolicycomponent.cc.
Definition at line 81 of file packagepolicycomponent.cc.
Definition at line 84 of file packagepolicycomponent.cc.
| void zyppng::sat::PackagePolicyComponent::setNeedrebootSpec | ( | SolvableSpec | spec | ) |
Replace the reboot-needed spec.
The spec is evaluated on the next prepare() call. Pass an empty SolvableSpec to disable the hint entirely.
Definition at line 87 of file packagepolicycomponent.cc.
Definition at line 97 of file packagepolicycomponent.cc.
|
private |
Definition at line 92 of file packagepolicycomponent.h.
|
private |
hardwired: provides retracted-patch-package()
Definition at line 94 of file packagepolicycomponent.h.
|
private |
hardwired: provides ptf()
Definition at line 95 of file packagepolicycomponent.h.
|
private |
hardwired: provides ptf-package()
Definition at line 96 of file packagepolicycomponent.h.
|
private |
user-supplied
Definition at line 97 of file packagepolicycomponent.h.
|
private |
Definition at line 101 of file packagepolicycomponent.h.
|
private |
Definition at line 102 of file packagepolicycomponent.h.
|
private |
Definition at line 103 of file packagepolicycomponent.h.
|
private |
Definition at line 104 of file packagepolicycomponent.h.