]> pd.if.org Git - zpackage/blobdiff - src/syncfs.c
rename pkglist to pkgid
[zpackage] / src / syncfs.c
index 220ee039c38ab0428266f29e8c2e8d5580bc16c4..9015fc1aed50e7c53f3b982f250b71a312f1a0b9 100644 (file)
@@ -349,7 +349,7 @@ static int read_item(struct config *conf, int ncols, char **vals, char **cols,
        n->ohash = COL("ohash");
        n->mds = COL("mds");
        n->omds = COL("omds");
-       n->pkglist = COL("pkglist");
+       n->pkglist = COL("pkgid");
 
        if (n->ftype == 'r') {
                n->hash = COL("hash");
@@ -1085,8 +1085,13 @@ static int config_handler(void *f, int ncols, char **vals, char **cols) {
                        save_config_file(conf, &nitem, save);
                }
                if (note) {
-                       zpm_note_add(conf->log, nitem.pkglist, nitem.path, nitem.hash,
-                                       note, nitem.hash);
+                       fprintf(stderr, "%s (%s) '%s' ", nitem.pkglist,
+                                       nitem.hash, nitem.path);
+                       fprintf(stderr, note, nitem.hash);
+                       fprintf(stderr, "\n");
+
+                       zpm_note_add(conf->log, nitem.pkglist, nitem.path,
+                                       nitem.hash, note, nitem.hash);
                }
        } else {
                if (save) {
@@ -1515,6 +1520,8 @@ static void runstage(struct config *conf, char *stage,
        }
        if (conf->reverse) {
                sqlite3_str_appendall(s," order by length(path) desc, path desc");
+       } else {
+               sqlite3_str_appendall(s," order by length(path), path");
        }
 
        sql = sqlite3_str_value(s);
@@ -1648,9 +1655,9 @@ int main(int ac, char **av) {
 
        /* TODO set conf var to finalize error reporting */
        if (conf.verbose) {
-               fprintf(stderr, "syncing filesystem %s (ldb %s) from %s\n",
+               fprintf(stderr, "syncing filesystem %s (ldb %s)\n",
                                conf.rootdir ? conf.rootdir : "/",
-                               localdbfile, pkgdbfile);
+                               localdbfile);
        }
 
        conf.errors = 0;