diff options
Diffstat (limited to 'load')
-rw-r--r-- | load/.gitignore | 1 | ||||
-rw-r--r-- | load/load.cli | 34 | ||||
-rw-r--r-- | load/load.cxx | 11 | ||||
-rw-r--r-- | load/types-parsers.hxx | 6 |
4 files changed, 29 insertions, 23 deletions
diff --git a/load/.gitignore b/load/.gitignore index 49afbe2..035e847 100644 --- a/load/.gitignore +++ b/load/.gitignore @@ -1,3 +1,2 @@ -*-options *-options.?xx brep-load diff --git a/load/load.cli b/load/load.cli index 51a34c3..826d997 100644 --- a/load/load.cli +++ b/load/load.cli @@ -10,25 +10,25 @@ include <libbrep/types.hxx>; "\section=1" "\name=brep-load" -"\summary=load build2 repositories into database" +"\summary=load build2 repositories into brep package database" { - "<options> <loadtab-file>", + "<options> <loadtab>", "\h|SYNOPSIS| \cb{brep-load --help}\n \cb{brep-load --version}\n - \c{\b{brep-load} [<options>] <loadtab-file>} + \c{\b{brep-load} [<options>] <loadtab>} \h|DESCRIPTION| \cb{brep-load} reads the list of repositories from the specified - configuration <loadtab-file>, fetches their manifest files, and loads the - repository and package information into the database, suitable for - consumption by the \cb{brep} web module. + <loadtab> configuration file, fetches their manifest files, and loads the + repository and package information into the \cb{package} database, suitable + for consumption by the \cb{brep} web module. - Note that \cb{brep-load} expects the database \cb{package} schema to have + Note that \cb{brep-load} expects the \cb{package} database schema to have already been created using \l{brep-migrate(1)}. Also note that \cb{brep-load} requires \l{bpkg(1)} to fetch repository @@ -119,12 +119,22 @@ class options "\h|EXIT STATUS| -\cb{0} Successful termination. +\dl| -\cb{1} Fatal error. +\li|\cb{0} -\cb{2} \cb{brep-load} or \l{brep-migrate(1)} instance is running. Try - again. +Success.| -\cb{3} The database recoverable error. Try again. +\li|\cb{1} + +Fatal error.| + +\li|\cb{2} + +An instance of \cb{brep-load} or \l{brep-migrate(1)} is already running. Try +again.| + +\li|\cb{3} + +Recoverable database error. Try again.|| " diff --git a/load/load.cxx b/load/load.cxx index f2c33e2..5a33631 100644 --- a/load/load.cxx +++ b/load/load.cxx @@ -27,9 +27,6 @@ #include <libbpkg/manifest.hxx> -#include <libbrep/types.hxx> -#include <libbrep/utility.hxx> - #include <libbrep/package.hxx> #include <libbrep/package-odb.hxx> #include <libbrep/database-lock.hxx> @@ -986,7 +983,7 @@ try if (argc < 2) { - cerr << "error: configuration file path argument expected" << endl + cerr << "error: configuration file expected" << endl << help_info << endl; return 1; } @@ -1018,7 +1015,7 @@ try const string ds ("package"); if (schema_catalog::current_version (db, ds) != db.schema_version (ds)) { - cerr << "error: database 'package' schema differs from the current one" + cerr << "error: package database schema differs from the current one" << endl << " info: use brep-migrate to migrate the database" << endl; return 1; } @@ -1091,12 +1088,12 @@ try } catch (const database_locked&) { - cerr << "brep-load or brep-migrate instance is running" << endl; + cerr << "brep-load or brep-migrate is running" << endl; return 2; } catch (const recoverable& e) { - cerr << "database recoverable error: " << e << endl; + cerr << "recoverable database error: " << e << endl; return 3; } catch (const cli::exception& e) diff --git a/load/types-parsers.hxx b/load/types-parsers.hxx index b52c107..74df66e 100644 --- a/load/types-parsers.hxx +++ b/load/types-parsers.hxx @@ -5,8 +5,8 @@ // CLI parsers, included into the generated source files. // -#ifndef BREP_LOAD_TYPES_PARSERS_HXX -#define BREP_LOAD_TYPES_PARSERS_HXX +#ifndef LOAD_TYPES_PARSERS_HXX +#define LOAD_TYPES_PARSERS_HXX #include <libbrep/types.hxx> @@ -25,4 +25,4 @@ namespace cli }; } -#endif // BREP_LOAD_TYPES_PARSERS_HXX +#endif // LOAD_TYPES_PARSERS_HXX |