libzypp: zypp::PurgeKernels::Impl Struct Reference

libzypp 17.38.6

zypp::PurgeKernels::Impl Struct Reference

## Public Member Functions
| Impl ()
void | setUnameR (const std::string &uname)
bool | removePackageAndCheck (const sat::Solvable slv, const std::set< sat::Solvable > &keepList, const std::set< sat::Solvable > &removeList) const
void | parseKeepSpec ()
void | fillKeepList (const GroupMap &installedKernels, std::set< sat::Solvable > &keepList, std::set< sat::Solvable > &removeList) const

## Static Public Member Functions
static bool | versionMatch (const Edition &a, const Edition &b)

## Public Attributes
std::set< size_t > | _keepLatestOffsets = { 0 }
std::set< size_t > | _keepOldestOffsets
std::set< Edition > | _keepSpecificEditions
std::string | _uname_r
std::set< Edition > | _runningKernelEditionVariants
Flavour | _runningKernelFlavour
Arch | _kernelArch
std::string | _keepSpec = ZConfig::instance().multiversionKernels()
bool | _keepRunning = true
bool | _detectedRunning = false

## Detailed Description

Definition at line 59 of file PurgeKernels.cc.

## Constructor & Destructor Documentation

## ◆ Impl()

zypp::PurgeKernels::Impl::Impl | ( |  | ) |
| inline

Definition at line 61 of file PurgeKernels.cc.

## Member Function Documentation

## ◆ setUnameR()

void zypp::PurgeKernels::Impl::setUnameR | ( | const std::string & | uname | ) |
| inline

Definition at line 82 of file PurgeKernels.cc.

## ◆ removePackageAndCheck()

bool zypp::PurgeKernels::Impl::removePackageAndCheck | ( | const sat::Solvable | slv,
|  | const std::set< sat::Solvable > & | keepList,
|  | const std::set< sat::Solvable > & | removeList ) const

tries to remove a the PoolItem pi from the pool, solves and checks if no unexpected packages are removed due to the validRemovals regex. If the constraint fails the changes are reverted and false is returned.

Definition at line 144 of file PurgeKernels.cc.

## ◆ versionMatch()

bool zypp::PurgeKernels::Impl::versionMatch | ( | const Edition & | a,
|  | const Edition & | b )
| static

Return true if a == b or a == (b minus rebuild counter)

Definition at line 278 of file PurgeKernels.cc.

## ◆ parseKeepSpec()

void zypp::PurgeKernels::Impl::parseKeepSpec | ( |  | ) |

Parse the config line keep spec that tells us which kernels should be kept

Definition at line 300 of file PurgeKernels.cc.

## ◆ fillKeepList()

void zypp::PurgeKernels::Impl::fillKeepList | ( | const GroupMap & | installedKernels,
|  | std::set< sat::Solvable > & | keepList,
|  | std::set< sat::Solvable > & | removeList ) const

Go over the list of available Editions for each flavour/arch combinations, apply the keep spec and mark the packages that belong to a matching category as to keep

All packages with Arch_noarch will only be matched against the version but NOT the flavour, reasoning for that is simply that source flavours not necessarily match the binary flavours. Without a translation table that would not be doable. This is also what the perl script did.

Definition at line 380 of file PurgeKernels.cc.

## Member Data Documentation

## ◆ _keepLatestOffsets

std::set<size_t> zypp::PurgeKernels::Impl::_keepLatestOffsets = { 0 }

Definition at line 123 of file PurgeKernels.cc.

## ◆ _keepOldestOffsets

std::set<size_t> zypp::PurgeKernels::Impl::_keepOldestOffsets

Definition at line 124 of file PurgeKernels.cc.

## ◆ _keepSpecificEditions

std::set<Edition> zypp::PurgeKernels::Impl::_keepSpecificEditions

Definition at line 125 of file PurgeKernels.cc.

## ◆ _uname_r

std::string zypp::PurgeKernels::Impl::_uname_r

Definition at line 126 of file PurgeKernels.cc.

## ◆ _runningKernelEditionVariants

std::set<Edition> zypp::PurgeKernels::Impl::_runningKernelEditionVariants

A kernel uname can expand into multiple variants especially with rc kernels, older rc releases replaced the upstream tag -rc with .rc, however newer code replaces it with ~rc. We need to check against all variants to match the correct one.

Definition at line 132 of file PurgeKernels.cc.

## ◆ _runningKernelFlavour

Flavour zypp::PurgeKernels::Impl::_runningKernelFlavour

Definition at line 133 of file PurgeKernels.cc.

## ◆ _kernelArch

Arch zypp::PurgeKernels::Impl::_kernelArch

Definition at line 134 of file PurgeKernels.cc.

## ◆ _keepSpec

std::string zypp::PurgeKernels::Impl::_keepSpec = ZConfig::instance().multiversionKernels()

Definition at line 135 of file PurgeKernels.cc.

## ◆ _keepRunning

bool zypp::PurgeKernels::Impl::_keepRunning = true

Definition at line 136 of file PurgeKernels.cc.

## ◆ _detectedRunning

bool zypp::PurgeKernels::Impl::_detectedRunning = false

Definition at line 137 of file PurgeKernels.cc.

The documentation for this struct was generated from the following file:

- zypp/PurgeKernels.cc