diff options
author | Marco Pesenti Gritti <mpgritti@gmail.com> | 2008-10-18 00:33:34 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpgritti@gmail.com> | 2008-10-18 00:33:34 (GMT) |
commit | c64a339afd815d41e3c0cdc0f521450c5828e143 (patch) | |
tree | c61b57249d93bd295e0d0e6c625f49c1a67d781b /scripts | |
parent | 5bedc4c64d0e9d26e0ff1e4b2963a75516983eaf (diff) |
Option to get script friendly deps check output.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/depscheck.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/depscheck.py b/scripts/depscheck.py index 68091ca..f318404 100644 --- a/scripts/depscheck.py +++ b/scripts/depscheck.py @@ -1,4 +1,5 @@ import sys +from optparse import make_option from jhbuild.commands import Command, register_command @@ -9,9 +10,16 @@ class cmd_depscheck(Command): name = 'depscheck' usage_args = '' + def __init__(self): + Command.__init__(self, [ + make_option('-s', '--script', + action='store_true', dest='script', default=False, + help=_('script friendly output')), + ]) + def run(self, config, options, args): deps = sysdeps.get_packages() - if not deps: + if not options.script and not deps: print 'Dependencies information is missing, skip sanity check.' return @@ -21,7 +29,8 @@ class cmd_depscheck(Command): missing_deps.append(package) if missing_deps: - print 'Missing packages:' + if not options.script: + print 'Missing packages:' print ' '.join(missing_deps) sys.exit(1) |