]> scripts.mit.edu Git - wizard.git/commitdiff
Update TODO, and add framework for interactivity in install.
authorEdward Z. Yang <ezyang@mit.edu>
Tue, 18 Aug 2009 01:05:06 +0000 (21:05 -0400)
committerEdward Z. Yang <ezyang@mit.edu>
Tue, 18 Aug 2009 01:05:06 +0000 (21:05 -0400)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
TODO
wizard/install.py

diff --git a/TODO b/TODO
index a38c28ddcebfd8c6935390ebfe94a8a1297e7628..ac022ca3eaaf78bcfd77286104386bf49e38d236 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,6 +2,17 @@ The Git Autoinstaller
 
 TODO NOW:
 
+- Make sure massmigrate cleanly ignores already migrated
+  installs
+- Make sure MediaWiki repository is as close to perfect
+  as possible:
+    - Do an install, migrate and then `git status`
+    - Check out possible missing php.ini's
+    - Remove "Merge comments" from lines
+    - Fix Signed-off-by lines
+- Add some safeguard code to make sure you don't run migrate
+  or upgrade as root
+
 - We have safe, non-braindead
   version detection with `git describe --tags`.  Switch
   everything to use it.  (I think the only thing left is
@@ -49,6 +60,9 @@ Some other stuff to do in your copious free time:
   for this.
 - Make 'wizard summary' generate nice pretty graphs of installs by date
   (more histograms, will need to check actual .scripts-version files.)
+- It should be able to handle installs like Django where there's a component
+  that gets installed in web_scripts and another directory that gets installed
+  in Scripts.
 
 PULLING OUT CONFIGURATION FILES IN AN AUTOMATED MANNER
 
index f237b8eff4333e1f4af75148fe023f466a18c3b3..b6d5271e00a713feffa3c4356820d43d0a0f782c 100644 (file)
@@ -62,6 +62,7 @@ import os
 import httplib
 import urllib
 import subprocess
+import getpass
 
 import wizard
 from wizard import shell, util
@@ -173,6 +174,8 @@ class Arg(object):
     help = None
     #: String "type" of the argument, used for metavar
     type = None
+    #: If true, is a password
+    password = None
     @property
     def option(self):
         """Full string of the option."""
@@ -181,6 +184,11 @@ class Arg(object):
     def envname(self):
         """Name of the environment variable containing this arg."""
         return 'WIZARD_' + self.name.upper()
+    def prompt(self, options):
+        """Interactively prompts for a value and sets it to options."""
+        # XXX: put a sane default implementation; we'll probably need
+        # "big" descriptions for this, since 'help' is too sparse.
+        pass
     def __init__(self, name, password=False, type=None, help=None):
         self.name = name
         self.password = password
@@ -311,21 +319,21 @@ class ArgHandler(object):
         for argset in argsets_nostrategy:
             for arg in argset.args:
                 if getattr(options, arg.name) is None:
-                    # XXX: do something interactive
+                    # XXX: arg.prompt(options)
                     raise MissingRequiredParam(arg)
         def all_set(argset):
             for arg in argset.args:
                 if getattr(options, arg.name) is None:
                     return False
             return True
-        for argset in argsets_strategy:
-            if all_set(argset): continue
-            argset.strategy.execute(options)
-            # XXX: do something interactive
-        for argset in argsets_strategy_with_side_effects:
-            if all_set(argset): continue
-            argset.strategy.execute(options)
-            # XXX: refactor this
+        for sets in (argsets_strategy, argsets_strategy_with_side_effects):
+            for argset in sets:
+                if all_set(argset): continue
+                argset.strategy.execute(options)
+                for arg in argset.args:
+                    if getattr(options, arg.name) is None:
+                        # XXX: arg.prompt(options)
+                        raise MissingRequiredParam(arg)
 
 class Error(wizard.Error):
     """Base error class for this module."""