Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not generate sqlite databases by default #347

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cmd_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static GOptionEntry cmd_entries[] =
{ "database", 'd', 0, G_OPTION_ARG_NONE, &(_cmd_options.database),
"Generate sqlite databases for use with yum.", NULL },
{ "no-database", 0, 0, G_OPTION_ARG_NONE, &(_cmd_options.no_database),
"Do not generate sqlite databases in the repository.", NULL },
"Do not generate sqlite databases in the repository (default).", NULL },
{ "filelists-ext", 0, 0, G_OPTION_ARG_NONE, &(_cmd_options.filelists_ext),
"Create filelists-ext metadata with file hashes.", NULL },
{ "update", 0, 0, G_OPTION_ARG_NONE, &(_cmd_options.update),
Expand Down
4 changes: 2 additions & 2 deletions src/createrepo_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ main(int argc, char **argv)
cr_SqliteDb *fex_db = NULL;
cr_SqliteDb *oth_db = NULL;

if (!cmd_options->no_database) {
if (cmd_options->database) {
_cleanup_file_close_ int pri_db_fd = -1;
_cleanup_file_close_ int fil_db_fd = -1;
_cleanup_file_close_ int fex_db_fd = -1;
Expand Down Expand Up @@ -1887,7 +1887,7 @@ main(int argc, char **argv)
cr_repomdrecordfilltask_free(oth_fill_task, NULL);

// Sqlite db
if (!cmd_options->no_database) {
if (cmd_options->database) {

gchar *pri_db_name = g_strconcat(tmp_out_repo, "/primary.sqlite",
sqlite_compression_suffix, NULL);
Expand Down
6 changes: 3 additions & 3 deletions src/mergerepo_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -1242,7 +1242,7 @@ dump_merged_metadata(GHashTable *merged_hashtable,
cr_SqliteDb *fex_db = NULL;
cr_SqliteDb *oth_db = NULL;

if (!cmd_options->no_database) {
if (cmd_options->database) {
gchar *pri_db_filename = NULL;
gchar *fil_db_filename = NULL;
gchar *fex_db_filename = NULL;
Expand Down Expand Up @@ -1329,7 +1329,7 @@ dump_merged_metadata(GHashTable *merged_hashtable,
cr_xmlfile_add_chunk(oth_cr_zck, (const char *) res.other, NULL);
}

if (!cmd_options->no_database) {
if (cmd_options->database) {
cr_db_add_pkg(pri_db, pkg, NULL);
cr_db_add_pkg(fil_db, pkg, NULL);
if (cmd_options->filelists_ext)
Expand Down Expand Up @@ -1585,7 +1585,7 @@ dump_merged_metadata(GHashTable *merged_hashtable,

// Sqlite db

if (!cmd_options->no_database) {
if (cmd_options->database) {
const char *db_suffix = cr_compression_suffix(cmd_options->db_compression_type);

// Insert XML checksums into the dbs
Expand Down