X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm-syncfs.c;h=c630963030dd001de7bacf2043964f41bfe2b43d;hb=89a160b4762730e078ed8d2e5c212a51f17ac6f8;hp=beff5608ef331083626a1468e7c424de7ea7477e;hpb=c6358b8aba981d20b80d233e4d2edb79c802502b;p=zpackage diff --git a/zpm-syncfs.c b/zpm-syncfs.c index beff560..c630963 100644 --- a/zpm-syncfs.c +++ b/zpm-syncfs.c @@ -229,6 +229,7 @@ static char *column(char *col, int ncols, char **vals, char **cols) { #define SYSERR(x) do { conf->log->error = 2; return conf->errabort; } while (0) +/* TODO handle other ops properly */ static char *ops[] = { "new", "remove", "update", 0 }; enum op { @@ -1108,7 +1109,7 @@ static void handle_config_files(struct config *conf) { } sqlite3_str_appendall(s, " as dest from syncinfo"); - sqlite3_str_appendall(s," where configuration > 0"); + sqlite3_str_appendall(s," where configuration > 0 and op in ('new','update','remove')"); if (conf->reverse) { sqlite3_str_appendall(s," order by length(path) desc, path desc"); @@ -1241,7 +1242,7 @@ static int install_files(void *f, int ncols, char **vals, char **cols) { if (update) { if (!exist) { /* warn, it should exist */ - fprintf(stderr, "%s missing, installing", nitem.dest); + fprintf(stderr, "%s missing, installing\n", nitem.dest); return install(conf, &nitem, 3); }