[Pkg-libvirt-commits] [libguestfs] 08/17: ocaml tools: Only tell people to use -v -x if they're not already set (RHBZ#1167623).

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:12:15 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.43
in repository libguestfs.

commit ab7197476de1cb3c8727caf4da429f6293ca4227
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Fri May 15 11:01:03 2015 +0100

    ocaml tools: Only tell people to use -v -x if they're not already set (RHBZ#1167623).
    
    When you get an error in tools, it will print a message like:
    
      If reporting bugs, run virt-v2v with debugging enabled and include the
      complete output:
    
        virt-v2v -v -x [...]
    
    Only print this message if -v or -x were not already specified on the
    command line.
---
 mllib/common_utils.ml | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index cdbe674..085089a 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -297,11 +297,13 @@ let error ?(exit_code = 1) fs =
     let chan = stderr in
     ansi_red ~chan ();
     wrap ~chan (sprintf (f_"%s: error: %s") prog str);
-    prerr_newline ();
-    prerr_newline ();
-    wrap ~chan
-      (sprintf (f_"If reporting bugs, run %s with debugging enabled and include the complete output:\n\n  %s -v -x [...]")
-         prog prog);
+    if not (verbose () && trace ()) then (
+      prerr_newline ();
+      prerr_newline ();
+      wrap ~chan
+           (sprintf (f_"If reporting bugs, run %s with debugging enabled and include the complete output:\n\n  %s -v -x [...]")
+                    prog prog);
+    );
     ansi_restore ~chan ();
     prerr_newline ();
     exit exit_code

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list