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 PurgeKernels.cc.

Constructor & Destructor Documentation

◆ Impl()

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

Definition at line 60 of file PurgeKernels.cc.

Member Function Documentation

◆ setUnameR()

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

Definition at line 78 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 125 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 235 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 257 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 326 of file PurgeKernels.cc.

Member Data Documentation

◆ _keepLatestOffsets

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

Definition at line 109 of file PurgeKernels.cc.

◆ _keepOldestOffsets

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

Definition at line 110 of file PurgeKernels.cc.

◆ _keepSpecificEditions

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

Definition at line 111 of file PurgeKernels.cc.

◆ _uname_r

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

Definition at line 112 of file PurgeKernels.cc.

◆ _runningKernelEdition

Edition zypp::PurgeKernels::Impl::_runningKernelEdition

Definition at line 113 of file PurgeKernels.cc.

◆ _runningKernelFlavour

Flavour zypp::PurgeKernels::Impl::_runningKernelFlavour

Definition at line 114 of file PurgeKernels.cc.

◆ _kernelArch

Arch zypp::PurgeKernels::Impl::_kernelArch

Definition at line 115 of file PurgeKernels.cc.

◆ _keepSpec

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

Definition at line 116 of file PurgeKernels.cc.

◆ _keepRunning

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

Definition at line 117 of file PurgeKernels.cc.

◆ _detectedRunning

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

Definition at line 118 of file PurgeKernels.cc.


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