diff options
author | Julian Andres Klode <jak@debian.org> | 2021-01-04 10:17:45 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2021-01-04 10:17:45 +0000 |
commit | fba6d562bda307bb1e619c255682079aa86c68ac (patch) | |
tree | c66205b3d0def0fb9b47d3a6b61edae0045dc906 /apt-pkg/algorithms.h | |
parent | da468783ecfb0b5a8575b1d91abae193519ef5a7 (diff) | |
parent | 38c49b8adeadf54f147140b3a5db7693e9b9b50f (diff) |
Merge branch 'pu/kernel-autoremove' into 'master'
Determine autoremovable kernels at run-time
See merge request apt-team/apt!138
Diffstat (limited to 'apt-pkg/algorithms.h')
-rw-r--r-- | apt-pkg/algorithms.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apt-pkg/algorithms.h b/apt-pkg/algorithms.h index fc578a4ca..12a77d4b8 100644 --- a/apt-pkg/algorithms.h +++ b/apt-pkg/algorithms.h @@ -29,11 +29,13 @@ #ifndef PKGLIB_ALGORITHMS_H #define PKGLIB_ALGORITHMS_H +#include <apt-pkg/cachefilter.h> #include <apt-pkg/depcache.h> #include <apt-pkg/packagemanager.h> #include <apt-pkg/pkgcache.h> #include <iostream> +#include <memory> #include <string> #include <apt-pkg/macros.h> @@ -146,5 +148,17 @@ APT_PUBLIC bool pkgFixBroken(pkgDepCache &Cache); APT_PUBLIC void pkgPrioSortList(pkgCache &Cache,pkgCache::Version **List); +namespace APT +{ +namespace KernelAutoRemoveHelper +{ +// Public for linking to apt-private, but no A{P,B}I guarantee. +APT_PUBLIC std::unique_ptr<APT::CacheFilter::Matcher> GetProtectedKernelsFilter(pkgCache *cache, bool returnRemove = false); +std::string GetProtectedKernelsRegex(pkgCache *cache, bool ReturnRemove = false); +std::string getUname(std::string const &packageName); + +} // namespace KernelAutoRemoveHelper + +} // namespace APT #endif |