libzypp  17.25.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
Edition _runningKernelEdition
Flavour _runningKernelFlavour
Arch _kernelArch
std::string _keepSpec = ZConfig::instance().multiversionKernels()
bool _keepRunning = true
bool _detectedRunning = false

Detailed Description

Definition at line 58 of file

Constructor & Destructor Documentation

◆ Impl()

zypp::PurgeKernels::Impl::Impl ( )

Definition at line 60 of file

Member Function Documentation

◆ setUnameR()

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

Definition at line 78 of file

◆ 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 125 of file

◆ versionMatch()

bool zypp::PurgeKernels::Impl::versionMatch ( const Edition a,
const Edition b 

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

Definition at line 235 of file

◆ parseKeepSpec()

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

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

Definition at line 257 of file

◆ 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 326 of file

Member Data Documentation

◆ _keepLatestOffsets

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

Definition at line 109 of file

◆ _keepOldestOffsets

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

Definition at line 110 of file

◆ _keepSpecificEditions

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

Definition at line 111 of file

◆ _uname_r

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

Definition at line 112 of file

◆ _runningKernelEdition

Edition zypp::PurgeKernels::Impl::_runningKernelEdition

Definition at line 113 of file

◆ _runningKernelFlavour

Flavour zypp::PurgeKernels::Impl::_runningKernelFlavour

Definition at line 114 of file

◆ _kernelArch

Arch zypp::PurgeKernels::Impl::_kernelArch

Definition at line 115 of file

◆ _keepSpec

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

Definition at line 116 of file

◆ _keepRunning

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

Definition at line 117 of file

◆ _detectedRunning

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

Definition at line 118 of file

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