sqlite3-backend: only optimize when called with --gensqlite3 as only operation

This commit is contained in:
Silvan Calarco 2013-10-07 16:25:00 +02:00
parent 93f7fc1233
commit aaf59faaf7

View File

@ -1015,12 +1015,6 @@ main(int argc, char *argv[])
name = NULL;
} else if (!strcmp(longopts[longindex].name, "gensqlite3")) {
mode |= MODE_SQLITE3;
genheader_mode |= GENHEADER_CHANGELOG;
recursive_mode = 0;
incremental_mode = 0;
obsolete_packages = 0;
resolve_dependencies = 0;
name = NULL;
} else if (!strcmp(longopts[longindex].name, "gensrcpkglist")) {
mode |= MODE_GENSRCPKGLIST;
name = NULL;
@ -1078,6 +1072,16 @@ main(int argc, char *argv[])
program_usage(1);
}
/* if only target is sqlite3 db minimize operations */
if (mode == MODE_SQLITE3) {
genheader_mode |= GENHEADER_CHANGELOG;
recursive_mode = 0;
incremental_mode = 0;
obsolete_packages = 0;
resolve_dependencies = 0;
name = NULL;
}
if (!configfile) {
configfile = malloc(sizeof DEFAULT_CONFIGFILE);
if (!configfile) {