summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire.h
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2024-01-03 13:53:09 +0000
committerDavid Kalnischkies <david@kalnischkies.de>2024-01-03 13:53:09 +0000
commitc82f96210eb62c92d31ded7073f4cf5371cc9485 (patch)
treeb0ba92b152c2dae076a8f0d811af287084878a89 /apt-pkg/acquire.h
parentc555d8f1ae31d1f511bf811640423231b75a8e13 (diff)
Improve and test distclean implementation
The implementation as-is as various smaller/esoteric bugs and inconsistencies like apt-get not supporting them, the option -s being supported in code but not accepted on the command line, the regex not escaping the dot before the file extension and exposing more implementation details to public headers than we actually need. Also comes with a small test case to ensure it actually works. References: bd7c126e3fb1b94e76e0e632c657cea854586844
Diffstat (limited to 'apt-pkg/acquire.h')
-rw-r--r--apt-pkg/acquire.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/apt-pkg/acquire.h b/apt-pkg/acquire.h
index a5f7a40c8..f7c40aa5f 100644
--- a/apt-pkg/acquire.h
+++ b/apt-pkg/acquire.h
@@ -70,7 +70,6 @@
#include <apt-pkg/weakptr.h>
#include <chrono>
-#include <functional>
#include <string>
#include <vector>
@@ -338,7 +337,7 @@ class APT_PUBLIC pkgAcquire
*
* \return \b true if the directory exists and is readable.
*/
- bool CleanLists(std::string Dir);
+ bool CleanLists(std::string const &Dir);
/** \return the total size in bytes of all the items included in
* this download.
@@ -381,20 +380,6 @@ class APT_PUBLIC pkgAcquire
private:
APT_HIDDEN void Initialize();
-
- /** Delete each entry in the given directory whose name does \em not match
- * a criterion.
- *
- * \param Dir The directory to be cleaned.
- *
- * \param KeepP A predicate telling to keep the named file; if it is
- * non-empty and returns true, the file is kept.
- *
- * \param Caller Log name of the caller.
- *
- * \return \b true if the directory exists and is readable.
- */
- APT_HIDDEN static bool CleanDir(std::string Dir, std::function<bool(char const*)> const &KeepP, char const * const Caller);
};
/** \brief Represents a single download source from which an item