Tidied repository with other small changes

This commit is contained in:
David Allen 2024-07-14 20:17:47 -06:00
parent c1ca0524f1
commit 5819c76289
No known key found for this signature in database
GPG key ID: 1D2A29322FBB6FCB
9 changed files with 10 additions and 5 deletions

1
include/argparse Symbolic link
View file

@ -0,0 +1 @@
../modules/argparse/include/argparse

View file

@ -16,6 +16,7 @@ namespace gdpm::cache {
string table_name = GDPM_PACKAGE_CACHE_TABLENAME; string table_name = GDPM_PACKAGE_CACHE_TABLENAME;
}; };
bool exists(const params& = params());
error create_package_database(bool overwrite = false, const params& = params()); error create_package_database(bool overwrite = false, const params& = params());
error insert_package_info(const package::info_list& packages, const params& = params()); error insert_package_info(const package::info_list& packages, const params& = params());
result_t<package::info_list> get_package_info_by_id(const package::id_list& package_ids, const params& = params()); result_t<package::info_list> get_package_info_by_id(const package::id_list& package_ids, const params& = params());

View file

@ -8,6 +8,7 @@
#include <variant> #include <variant>
#include <future> #include <future>
#include <any> #include <any>
#include <algorithm>
namespace gdpm{ namespace gdpm{
class error; class error;

View file

@ -11,7 +11,7 @@ namespace gdpm::version{
int major = 0; int major = 0;
int minor = 0; int minor = 0;
int patch = 0; int patch = 0;
string commit = ""; string description = "";
}; };
std::string to_string(const context& context); std::string to_string(const context& context);

@ -1 +0,0 @@
Subproject commit 02783b6782ebedbb2bebc2e6ceda738ee51c7df2

View file

@ -17,6 +17,10 @@ namespace gdpm::cache{
return utils::replace_all(s, "'", "''"); return utils::replace_all(s, "'", "''");
} }
bool exists(const params& params) {
return std::filesystem::exists(params.cache_path);
}
error create_package_database( error create_package_database(
bool overwrite, bool overwrite,
const params& params const params& params

View file

@ -58,7 +58,7 @@ namespace gdpm::package{
if(p_cache.empty()){ if(p_cache.empty()){
return log::error_rc( return log::error_rc(
ec::NOT_FOUND, /* TODO: change to PACKAGE_NOT_FOUND */ ec::NOT_FOUND, /* TODO: change to PACKAGE_NOT_FOUND */
"package::install(): no packages found to install." "package::install(): no package(s) found to install."
); );
} }

View file

@ -313,7 +313,7 @@ namespace gdpm::utils{
case 5: return s + " PB"; case 5: return s + " PB";
} }
return std::to_string(size); return std::to_string(size);
} }
namespace json { namespace json {
string from_array( string from_array(

@ -1 +0,0 @@
Subproject commit ef71abd9bc7254f7734fa84d5b1c336be2deb9f7