- if (zpm_import(conf->log, n->dest, 0, hash)) {
- zpm_note_add(conf->log, n->pkglist, n->dest, hash,
- "replaced config file with non-config. zpm-cat %.8s", hash);
+ if (!conf->dryrun) {
+ if (conf->verbose) {
+ fprintf(stderr, "importing old conf file\n");
+ }
+ if (zpm_import(conf->log, n->dest, 0, hash)) {
+ zpm_note_add(conf->log, n->pkglist, n->dest, hash,
+ "replaced config file with non-config. zpm-cat %.8s", hash);
+ } else {
+ fprintf(stderr, "unable to import existing config file %s\n", n->dest);
+ return -1;
+ }