]> pd.if.org Git - zpackage/blobdiff - zpm-syncfs.c
add link target to dry run output
[zpackage] / zpm-syncfs.c
index 8ed7c8341ea6ee595b84fc970fd762371ead4ddd..06477f172563c84b4b9ec0f24d357481178e352f 100644 (file)
@@ -676,9 +676,13 @@ static int install(struct config *conf, struct nitem *item, unsigned int flags)
                        printf("rmdir %s\n", item->dest);
                }
 
-               printf("install %c%o %d:%d %s -> %s\n", item->ftype,
-                               item->mode, item->uid, item->gid, item->path,
+               printf("install %c%o %d:%d %s", item->ftype,
+                               item->mode, item->uid, item->gid,
                                item->dest);
+               if (item->ftype == 'l') {
+                       printf(" -> %s", item->target);
+               }
+               printf("\n");
                fflush(stdout);
                return success;
        }
@@ -1001,14 +1005,26 @@ static int install_files(void *f, int ncols, char **vals, char **cols) {
                                }
                                return 0;
                        }
+
                        if (mdsame && hashsame && !(accept || overwrite)) {
                                /* error */
                                return seterror(conf, "file exists: %s", nitem.dest);
                        }
+
                        if (mdsame && !hashsame && overwrite) {
                                /* install */
                                return install(conf, &nitem, eisdir ? 11 : 7);
                        }
+
+                       if (nitem.configuration && accept) {
+                               /* accept a changed config file */
+                               if (conf->dryrun || conf->verbose) {
+                                       fprintf(stderr, "accept %smodified config %s: %s\n", (!mdsame || !hashsame) ? "" : "un", 
+                                                       eisdir ? "directory" : "file", nitem.dest);
+                               }
+                               return 0;
+                       }
+
                        if (mdsame && !hashsame && !overwrite) {
                                /* accept doesn't matter, since it's
                                 * not an acceptable file */