diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-08 21:27:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2019-07-09 14:03:46 +0300 |
commit | c28758a9327efc0f3bfc2f3c14d12b533750d94b (patch) | |
tree | 6d40474dddd28973a2dc8899fe18c2cb4ea6ff40 /migrate | |
parent | 4dcc80df759c7ba1ada65b52a8dc6c793d56e4e5 (diff) |
Add support for marking internal repository as non-buildable
Diffstat (limited to 'migrate')
-rw-r--r-- | migrate/migrate.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/migrate/migrate.cxx b/migrate/migrate.cxx index 35beb20..f012da1 100644 --- a/migrate/migrate.cxx +++ b/migrate/migrate.cxx @@ -207,7 +207,6 @@ create (database& db, bool extra_only) const // Register the data migration functions for the package database schema. // -#if 0 template <schema_version v> using package_migration_entry_base = data_migration_entry<v, LIBBREP_PACKAGE_SCHEMA_VERSION_BASE>; @@ -219,11 +218,21 @@ struct package_migration_entry: package_migration_entry_base<v> : package_migration_entry_base<v> (f, "package") {} }; -static const package_migration_entry<12> +static const package_migration_entry<15> package_migrate_v15 ([] (database& db) { + // Set the buildable flag for the internal repositories. + // + db.execute ("UPDATE repository SET buildable = internal"); + + // Set the buildable flag for the internal non-stub packages. + // + db.execute ("UPDATE package SET buildable = " + "internal_repository_tenant IS NOT NULL AND " + "NOT (version_epoch = 0 AND " + "version_canonical_upstream = '' AND " + "version_canonical_release = '~')"); }); -#endif // main() function // |