libzypp: zypp::PurgeKernels Class Reference

libzypp 17.38.10

zypp::PurgeKernels Class Reference

`#include <zypp/PurgeKernels.h>`

## Classes
struct | Impl

## Public Member Functions
| PurgeKernels ()
void | markObsoleteKernels ()
void | setUnameR (const std::string &val)
std::string | unameR () const
void | setKernelArch (const zypp::Arch &arch)
Arch | kernelArch () const
void | setKeepSpec (const std::string &val)
std::string | keepSpec () const

## Private Attributes
RW_pointer< Impl > | _pimpl

## Detailed Description

Implements the logic of the "purge-kernels" command.

Definition at line 27 of file PurgeKernels.h.

## Constructor & Destructor Documentation

## ◆ PurgeKernels()

zypp::PurgeKernels::PurgeKernels | ( |  | ) |

Definition at line 480 of file PurgeKernels.cc.

## Member Function Documentation

## ◆ markObsoleteKernels()

void zypp::PurgeKernels::markObsoleteKernels | ( |  | ) |

Marks all currently obsolete Kernels according to the keep spec.

Note
  This will not commit the changes

Definition at line 486 of file PurgeKernels.cc.

## ◆ setUnameR()

void zypp::PurgeKernels::setUnameR | ( | const std::string & | val | ) |

Force a specific uname to be set, only used for testing, in production the running kernel is detected.

Definition at line 667 of file PurgeKernels.cc.

## ◆ unameR()

std::string zypp::PurgeKernels::unameR | ( |  | ) | const

Definition at line 672 of file PurgeKernels.cc.

## ◆ setKernelArch()

void zypp::PurgeKernels::setKernelArch | ( | const zypp::Arch & | arch | ) |

Force a specific kernel arch to be set, only used for testing, in production the running kernel arch is detected.

Definition at line 677 of file PurgeKernels.cc.

## ◆ kernelArch()

Arch zypp::PurgeKernels::kernelArch | ( |  | ) | const

Definition at line 682 of file PurgeKernels.cc.

## ◆ setKeepSpec()

void zypp::PurgeKernels::setKeepSpec | ( | const std::string & | val | ) |

Overrides the keep spec, the default value is read from ZConfig. The keep spec is a string of tokens seperated by ",". It only supports 3 different tokens:

- "running" matches only the currently running kernel of the system
- "oldest" matches the kernel version for each flavour/arch combination with the lowest edition can be modified with a positive number: oldest+n
- "latest" matches the kernel version for each flavour/arch combination with the highest edition can be modified with a negative number: latest-n

Definition at line 687 of file PurgeKernels.cc.

## ◆ keepSpec()

std::string zypp::PurgeKernels::keepSpec | ( |  | ) | const

Definition at line 692 of file PurgeKernels.cc.

## Member Data Documentation

## ◆ _pimpl

RW_pointer<Impl> zypp::PurgeKernels::_pimpl
| private

Definition at line 69 of file PurgeKernels.h.

The documentation for this class was generated from the following files:

- zypp/PurgeKernels.h
- zypp/PurgeKernels.cc