aboutsummaryrefslogtreecommitdiff
path: root/libbrep/build.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-07-08 21:27:53 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-07-09 14:03:46 +0300
commitc28758a9327efc0f3bfc2f3c14d12b533750d94b (patch)
tree6d40474dddd28973a2dc8899fe18c2cb4ea6ff40 /libbrep/build.hxx
parent4dcc80df759c7ba1ada65b52a8dc6c793d56e4e5 (diff)
Add support for marking internal repository as non-buildable
Diffstat (limited to 'libbrep/build.hxx')
-rw-r--r--libbrep/build.hxx41
1 files changed, 22 insertions, 19 deletions
diff --git a/libbrep/build.hxx b/libbrep/build.hxx
index 9fbf983..ea51c00 100644
--- a/libbrep/build.hxx
+++ b/libbrep/build.hxx
@@ -26,7 +26,7 @@
//
#define LIBBREP_BUILD_SCHEMA_VERSION_BASE 7
-#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 7, closed)
+#pragma db model version(LIBBREP_BUILD_SCHEMA_VERSION_BASE, 8, closed)
// We have to keep these mappings at the global scope instead of inside
// the brep namespace because they need to be also effective in the
@@ -262,10 +262,16 @@ namespace brep
}
};
- #pragma db view object(build) \
- object(build_package inner: \
- brep::operator== (build::id.package, build_package::id) && \
- build_package::internal_repository.canonical_name.is_not_null ()) \
+ // Note that ADL can't find the equal operator in join conditions, so we use
+ // the function call notation for them.
+ //
+
+ // Toolchains of existing buildable package builds.
+ //
+ #pragma db view object(build) \
+ object(build_package inner: \
+ brep::operator== (build::id.package, build_package::id) && \
+ build_package::buildable) \
query(distinct)
struct toolchain
{
@@ -303,27 +309,24 @@ namespace brep
canonical_version version_;
};
- // Build of an existing internal package.
- //
- // Note that ADL can't find the equal operator, so we use the function call
- // notation.
+ // Build of an existing buildable package.
//
- #pragma db view \
- object(build) \
- object(build_package inner: \
- brep::operator== (build::id.package, build_package::id) && \
- build_package::internal_repository.canonical_name.is_not_null ()) \
+ #pragma db view \
+ object(build) \
+ object(build_package inner: \
+ brep::operator== (build::id.package, build_package::id) && \
+ build_package::buildable) \
object(build_tenant: build_package::id.tenant == build_tenant::id)
struct package_build
{
shared_ptr<brep::build> build;
};
- #pragma db view \
- object(build) \
- object(build_package inner: \
- brep::operator== (build::id.package, build_package::id) && \
- build_package::internal_repository.canonical_name.is_not_null ()) \
+ #pragma db view \
+ object(build) \
+ object(build_package inner: \
+ brep::operator== (build::id.package, build_package::id) && \
+ build_package::buildable) \
object(build_tenant: build_package::id.tenant == build_tenant::id)
struct package_build_count
{