- XXX: Upgrades don't pull updated tags, breaking git describe --tags!
Fix this for the future, and figure out how to make everyone else happy!
-- XXX: Some installs are throwing spurious errors; investigate
-- XXX: Prolly would be nice to have some information about how many installs actually succeeded
- If you try to do an install on scripts w/o sql, it will sign you up but fail to write
the sql.cnf file. This sucks.
command.create_logdir(options.log_dir)
seen = sset.make(options.seen)
is_root = not os.getuid()
- report = command.open_reports(options.log_dir, ('lookup', 'warnings', 'errors'),
+ report = command.open_reports(options.log_dir, ('lookup', 'warnings', 'errors', 'success'),
options.redo, ('merge', 'verify', 'backup_failure', 'blacklisted'))
# loop stuff
errors = {}
report.lookup.write("[%04d] %s\n" % (i, d.location)) # pylint: disable-msg=E1101
logging.warning("[%04d] Warnings at [%s]:\n%s" % (i, d.location, stderr))
seen.add(d.location)
+ report.success.write("%s\n")
+ report.successes += 1
report.flush()
def on_error(e):
if e.name == "AlreadyUpgraded":
sys.stderr.write("\n")
for name, deploys in errors.items():
logging.warning("%s from %d installs" % (name, len(deploys)))
+ print
def printPercent(description, number, total):
- logging.warning("%d out of %d installs (%.1f%%) had %s" % (number, total, float(number)/total*100, description))
+ print "%d out of %d installs (%.1f%%) had %s" % (number, total, float(number)/total*100, description)
if report.fails['merge']:
printPercent("merge conflicts", report.fails['merge'], i)
if report.fails['verify']:
printPercent("web verification failure", report.fails['verify'], i)
+ printPercent("successful upgrades", report.successes, i)
def parse_args(argv, baton):
usage = """usage: %prog mass-upgrade [ARGS] APPLICATION