1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/PurgeKernels.h
13 #include <zypp/PoolItem.h>
14 #include <zypp/base/PtrTypes.h>
23 * Implements the logic of the "purge-kernels" command.
33 * Marks all currently obsolete Kernels according to the keep spec.
34 * \note This will not commit the changes
36 void markObsoleteKernels();
39 * Force a specific uname to be set, only used for testing,
40 * in production the running kernel is detected.
42 void setUnameR( const std::string &val );
43 std::string unameR() const;
47 * Force a specific kernel arch to be set, only used for testing,
48 * in production the running kernel arch is detected.
50 void setKernelArch( const zypp::Arch &arch );
51 Arch kernelArch() const;
54 * Overrides the keep spec, the default value is read from ZConfig.
55 * The keep spec is a string of tokens seperated by ",".
56 * It only supports 3 different tokens:
57 * - "running" matches only the currently running kernel of the system
58 * - "oldest" matches the kernel version for each flavour/arch combination with the lowest edition
59 * can be modified with a positive number: oldest+n
60 * - "latest" matches the kernel version for each flavour/arch combination with the highest edition
61 * can be modified with a negative number: latest-n
63 void setKeepSpec( const std::string &val );
64 std::string keepSpec () const;
68 RW_pointer<Impl> _pimpl;