From c82f96210eb62c92d31ded7073f4cf5371cc9485 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 3 Jan 2024 13:53:09 +0000 Subject: 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 --- cmdline/apt-get.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmdline') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 95c4a85ab..d41e0f243 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -424,6 +424,8 @@ static std::vector GetCommands() /*{{{*/ {"clean", &DoClean, _("Erase downloaded archive files")}, {"autoclean", &DoAutoClean, _("Erase old downloaded archive files")}, {"auto-clean", &DoAutoClean, nullptr}, + {"distclean", &DoDistClean, nullptr}, + {"dist-clean", &DoDistClean, nullptr}, {"check", &DoCheck, _("Verify that there are no broken dependencies")}, {"source", &DoSource, _("Download source archives")}, {"download", &DoDownload, _("Download the binary package into the current directory")}, -- cgit v1.2.3-70-g09d2