README.org: Fix some boneheaded typos.
[runlisp] / dump-runlisp-image.c
index 7a88be5..9dc6a2a 100644 (file)
@@ -702,7 +702,10 @@ static void add_job(unsigned f, struct config_section *sect)
   config_subst_split_var(&config, sect, runvar, &av_version);
   if (!av_version.n)
     lose("empty `run-script' command for Lisp implementation `%s'", name);
-  argv_append(&av_version, xstrdup("?(lisp-implementation-version)"));
+  argv_append(&av_version,
+             config_subst_string_alloc
+               (&config, sect, "<internal>",
+                "?${lisp-version?(lisp-implementation-version)}"));
   config_subst_split_var(&config, sect, dumpvar, &av_dump);
   if (!av_dump.n)
     lose("empty `dump-image' command for Lisp implementation `%s'", name);
@@ -982,6 +985,9 @@ static void finish_job(struct job *job)
        * job, because the chances are good that it failed to produce the
        * image properly.
        */
+      if (verbose >= 3)
+       moan("rename completed Lisp `%s' image `%s' to `%s'",
+            JOB_NAME(job), job->imgnew, job->imghash);
       if (rename(job->imgnew, job->imghash)) {
        fprintf(job->log, "%-13s > failed to rename Lisp `%s' "
                          "output image `%s' to `%s': %s",
@@ -1001,6 +1007,9 @@ static void finish_job(struct job *job)
            JOB_NAME(job), job->imgnewlink, strerror(errno));
        break;
       }
+      if (verbose >= 3)
+       moan("establish Lisp `%s' image link `%s' referring to `%s'",
+            JOB_NAME(job), job->imglink, job->imghash);
       if (symlink(p, job->imgnewlink)) {
        bad("failed to create Lisp `%s' image link `%s': %s",
            JOB_NAME(job), job->imgnewlink, strerror(errno));
@@ -1011,11 +1020,15 @@ static void finish_job(struct job *job)
            JOB_NAME(job), job->imgnewlink, job->imglink, strerror(errno));
        break;
       }
-      if (job->oldimg && STRCMP(job->oldimg, !=, job->imghash) &&
-         unlink(job->oldimg) && errno != ENOENT) {
-       if (verbose >= 1)
-         moan("failed to delete old Lisp `%s' image `%s': %s",
-              JOB_NAME(job), job->oldimg, strerror(errno));
+      if (job->oldimg && STRCMP(job->oldimg, !=, job->imghash)) {
+       if (verbose >= 3)
+         moan("remove old Lisp `%s' image `%s'",
+              JOB_NAME(job), job->oldimg);
+       if (unlink(job->oldimg) && errno != ENOENT) {
+         if (verbose >= 1)
+           moan("failed to delete old Lisp `%s' image `%s': %s",
+                JOB_NAME(job), job->oldimg, strerror(errno));
+       }
       }
 
       /* I think we're all done. */