aboutsummaryrefslogtreecommitdiff
path: root/bpkg/manifest-utility.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/manifest-utility.hxx')
-rw-r--r--bpkg/manifest-utility.hxx38
1 files changed, 38 insertions, 0 deletions
diff --git a/bpkg/manifest-utility.hxx b/bpkg/manifest-utility.hxx
index a5ea962..522ec2b 100644
--- a/bpkg/manifest-utility.hxx
+++ b/bpkg/manifest-utility.hxx
@@ -112,6 +112,42 @@ namespace bpkg
bool
repository_name (const string&);
+ // To pretend that repositories don't exist in the configurations, mask them
+ // by specifying either repository location canonical name or URL.
+ //
+ // Note that specifying a canonical name masks potentially multiple
+ // repositories (think of local and remote pkg repository locations), while
+ // specifying a URL masks a single repository.
+ //
+ // Also note that there is no straightforward way to deduce the list of
+ // repositories a specific repository fragment belongs to. To keep things
+ // simple, we currently only support masking of pkg and dir repositories.
+ // Such repositories have the only non-shared fragment which name and
+ // location are equal to the ones of the containing repository. Once we
+ // decide to also support repositories which support fragmentation (git),
+ // the potential implementation can preload all the masked fragments from
+ // all the databases, so that the masked_repository_fragment() predicate can
+ // refer to them.
+ //
+ void
+ mask_repository (const string&);
+
+ // Return true if a repository is masked either by name or by URL.
+ //
+ bool
+ masked_repository (const repository_location&);
+
+ // Return true if a repository fragment belongs to the masked repositories
+ // only (see package.hxx for the fragment/repository relationship details).
+ //
+ bool
+ masked_repository_fragment (const repository_location&);
+
+ // Return true if any repositories are masked.
+ //
+ bool
+ masked_repositories ();
+
// Return the versions of packages as provided by the build2 version module
// together with the build2 project info the versions originate from (in
// case the caller may want to reuse it). Return nullopt as a package
@@ -190,4 +226,6 @@ namespace bpkg
bool err_path_relative = false);
}
+#include <bpkg/manifest-utility.ixx>
+
#endif // BPKG_MANIFEST_UTILITY_HXX