help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [PATCH] Add --rebuild-image to gst-load


From: Paolo Bonzini
Subject: [Help-smalltalk] [PATCH] Add --rebuild-image to gst-load
Date: Tue, 11 Mar 2008 09:29:01 +0100
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

This was suggested yesterday on IRC. It's stupid that you have to create the image with gst, and then load packages onto it separately.

Paolo
diff --git a/ChangeLog b/ChangeLog
index 9ed74ec..13aa2ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-11  Paolo Bonzini  <address@hidden>
+
+       * scripts/Load.st: Add -i.
+       * gst-tool.c: Likewise.
+
 2008-03-10  Paolo Bonzini  <address@hidden>
 
        * kernel/CharArray.st: Move #startsWith: and #endsWith:...
diff --git a/gst-tool.c b/gst-tool.c
index 87e22d8..ad5efa3 100644
--- a/gst-tool.c
+++ b/gst-tool.c
@@ -92,13 +92,15 @@ struct tool tools[] = {
   {
     "gst-load", "scripts/Load.st",
     "-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run -f|--force \
-       --start:: -t|--test -I|--image-file: --kernel-directory:",
+       --start:: -t|--test -I|--image-file: --kernel-directory: \
+       -i|--rebuild-image",
     NULL
   },
   {
     "gst-reload", "scripts/Load.st",
     "-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run -f|--force \
-       --start:: -t|--test -I|--image-file: --kernel-directory:",
+       --start:: -t|--test -I|--image-file: --kernel-directory: \
+       -i|--rebuild-image",
     "--force"
   },
   {
@@ -257,6 +259,10 @@ parse_option (int short_opt, const char *long_opt, const 
char *arg)
       kernel_dir = arg;
     }
 
+  if (short_opt == 'i'
+      || (long_opt && !strcmp (long_opt, "rebuild-image")))
+    flags |= GST_REBUILD_IMAGE;
+
   if (long_opt && !strcmp (long_opt, "daemon"))
     {
 #ifdef HAVE_FORK
diff --git a/scripts/Load.st b/scripts/Load.st
index 2add5a9..211682a 100644
--- a/scripts/Load.st
+++ b/scripts/Load.st
@@ -53,6 +53,7 @@ Options:
     -n --dry-run          don''t save the image after loading
     -t --test             run SUnit tests if available
        --start[=ARG]      start the package and keep running the image
+    -i --rebuild-image    load into a newly-created image
     -I --image-file=FILE  load into the specified image
        --kernel-dir=PATH  use the specified kernel directory
     -h --help             show this message
@@ -63,7 +64,7 @@ Options:
 Smalltalk
     arguments: '-h|--help --version -q|--quiet -v|-V|--verbose -n|--dry-run
                -f|--force -t|--test -I|--image-file: --kernel-directory:
-               --start::'
+               --start:: -i|--rebuild-image'
     do: [ :opt :arg |
 
     opt = 'help' ifTrue: [

reply via email to

[Prev in Thread] Current Thread [Next in Thread]