aboutsummaryrefslogtreecommitdiff
path: root/load
diff options
context:
space:
mode:
Diffstat (limited to 'load')
-rw-r--r--load/load.cli9
-rw-r--r--load/load.cxx18
2 files changed, 12 insertions, 15 deletions
diff --git a/load/load.cli b/load/load.cli
index 7850d86..fe05ad2 100644
--- a/load/load.cli
+++ b/load/load.cli
@@ -28,8 +28,8 @@ include <brep/types>;
repository and package information into the database, suitable for
consumption by the \cb{brep} web module.
- Note that \cb{brep-load} expects the database schema to have already been
- created using \l{brep-migrate(1)}.
+ Note that \cb{brep-load} expects the database \cb{package} schema to have
+ already been created using \l{brep-migrate(1)}.
Also note that \cb{brep-load} requires \l{bpkg(1)} to fetch repository
information. See \cb{--bpkg} for more information on the package manager
@@ -54,10 +54,11 @@ class options
expected to work."
}
- std::string --db-name|-n = "brep"
+ std::string --db-name|-n = "brep_package"
{
"<name>",
- "Database name. If not specified, then '\cb{brep}' is used by default."
+ "Database name. If not specified, then \cb{brep_package} is used by
+ default."
}
std::string --db-host|-h
diff --git a/load/load.cxx b/load/load.cxx
index 8856e38..e611df2 100644
--- a/load/load.cxx
+++ b/load/load.cxx
@@ -50,12 +50,6 @@ struct failed {};
static const char* help_info (
" info: run 'brep-load --help' for more information");
-static inline bool
-space (char c) noexcept
-{
- return c == ' ' || c == '\t';
-}
-
struct internal_repository
{
repository_location location;
@@ -297,7 +291,7 @@ repository_info (const options& lo, const string& rl, const cstrings& options)
{
cerr << "error: unable to execute " << args[0] << ": " << e << endl;
- if (e.child ())
+ if (e.child)
exit (1);
throw failed ();
@@ -965,6 +959,7 @@ try
{
cout << "brep-load " << BREP_VERSION_STR << endl
<< "libbrep " << LIBBREP_VERSION_STR << endl
+ << "libbbot " << LIBBBOT_VERSION_STR << endl
<< "libbpkg " << LIBBPKG_VERSION_STR << endl
<< "libbutl " << LIBBUTL_VERSION_STR << endl
<< "Copyright (c) 2014-2017 Code Synthesis Ltd" << endl
@@ -1018,12 +1013,13 @@ try
transaction t (db.begin ());
- // Check that the database schema matches the current one.
+ // Check that the database 'package' schema matches the current one.
//
- if (schema_catalog::current_version (db) != db.schema_version ())
+ const string ds ("package");
+ if (schema_catalog::current_version (db, ds) != db.schema_version (ds))
{
- cerr << "error: database schema differs from the current one" << endl
- << " info: use brep-migrate to migrate the database" << endl;
+ cerr << "error: database 'package' schema differs from the current one"
+ << endl << " info: use brep-migrate to migrate the database" << endl;
return 1;
}