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
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
import httplib
import urllib
import subprocess
+import getpass
import wizard
from wizard import shell, util
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."""
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
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."""