aboutsummaryrefslogtreecommitdiff
path: root/bpkg/rep-remove.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-02-26 22:00:22 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-03-02 20:04:26 +0300
commit780290277a51853b2e515b16898ca0fcfa1e9e71 (patch)
treee045dd9cc4ce2726f915897157785cb40b48756f /bpkg/rep-remove.hxx
parent046f9282dc7778f5df326456f1630919a5607f11 (diff)
Update rep-fetch
Diffstat (limited to 'bpkg/rep-remove.hxx')
-rw-r--r--bpkg/rep-remove.hxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/bpkg/rep-remove.hxx b/bpkg/rep-remove.hxx
index 8bc6144..a7a6418 100644
--- a/bpkg/rep-remove.hxx
+++ b/bpkg/rep-remove.hxx
@@ -6,6 +6,7 @@
#define BPKG_REP_REMOVE_HXX
#include <bpkg/types.hxx>
+#include <bpkg/forward.hxx> // database, repository
#include <bpkg/utility.hxx>
#include <bpkg/rep-remove-options.hxx>
@@ -14,6 +15,37 @@ namespace bpkg
{
int
rep_remove (const rep_remove_options&, cli::scanner& args);
+
+ // Remove a repository if it is not reachable from the root (and thus is not
+ // required by any user-added repository).
+ //
+ void
+ rep_remove (const dir_path& conf, database&, const shared_ptr<repository>&);
+
+ // Bring the configuration to the clean state as if repositories were added
+ // but never fetched. Leave selected packages intact. Note that it should be
+ // called out of the database transaction.
+ //
+ // Specifically:
+ //
+ // - Clean prerequisite and complement repository sets for the top-level
+ // repositories.
+ //
+ // - Remove all repositories except the top-level ones and the root.
+ //
+ // - Remove all repository state directories (regardless of whether they
+ // actually relate to any existing repositories).
+ //
+ // - Remove all available packages.
+ //
+ void
+ rep_remove_clean (const dir_path& conf, database&, bool quiet = true);
+
+ // Remove a repository from locations of the available packages it
+ // contains. Remove packages that come from only this repository.
+ //
+ void
+ rep_remove_package_locations (database&, const string& repository_name);
}
#endif // BPKG_REP_REMOVE_HXX