support/scripts/graph-depends: add --quiet option
authorPeter Korsgaard <peter@korsgaard.com>
Sun, 1 Apr 2018 19:14:49 +0000 (21:14 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 1 Apr 2018 20:25:57 +0000 (22:25 +0200)
This will be useful for the upcoming recursive show-depends and
show-rdepends features.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
support/scripts/graph-depends

index 17bfaa0cf51566488d176132afdd829555f547eb..4ec0e46f7bee461102a48a81e9417a07170d64c0 100755 (executable)
@@ -312,6 +312,8 @@ def parse_args():
                         help="Draw direct dependencies (the default)")
     parser.add_argument("--reverse", dest="direct", action='store_false',
                         help="Draw reverse dependencies")
+    parser.add_argument("--quiet", '-q', dest="quiet", action='store_true',
+                        help="Quiet")
     return parser.parse_args()
 
 
@@ -321,7 +323,7 @@ def main():
     check_only = args.check_only
 
     logging.basicConfig(stream=sys.stderr, format='%(message)s',
-                        level=logging.INFO)
+                        level=logging.WARNING if args.quiet else logging.INFO)
 
     if args.outfile is None:
         outfile = sys.stdout