[Pkg-libvirt-commits] [libguestfs] 29/72: builder: handle -v and -x flags like in other tools (RHBZ#1196100)

Hilko Bengen bengen at moszumanska.debian.org
Sun Apr 5 15:19:49 UTC 2015


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

bengen pushed a commit to branch master
in repository libguestfs.

commit bbf4ccdb6e4513d8f113a26f2a0b87ddbf15c739
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Thu Feb 26 10:01:14 2015 +0100

    builder: handle -v and -x flags like in other tools (RHBZ#1196100)
    
    Make sure that -x enables tracing and -v enables verbose mode, just like
    other tools do.
    
    Kind of followup of commit b6b9b90dd74c7b9204bdf218aa9360e117308e78.
    
    (cherry picked from commit be79bdfd3acb25018feb2a808aa1343c2cc8b95c)
---
 builder/builder.ml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/builder/builder.ml b/builder/builder.ml
index a519913..0ddf076 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -555,7 +555,8 @@ let main () =
       let preallocation = if oformat = "qcow2" then Some "metadata" else None in
       let () =
         let g = new G.guestfs () in
-        if verbose then ( g#set_trace true; g#set_verbose true );
+        if trace then g#set_trace true;
+        if verbose then g#set_verbose true;
         g#disk_create ?preallocation ofile oformat osize in
       let cmd =
         sprintf "virt-resize%s%s%s --output-format %s%s%s %s %s"
@@ -608,7 +609,8 @@ let main () =
   msg (f_"Opening the new disk");
   let g =
     let g = new G.guestfs () in
-    if verbose then g#set_trace true;
+    if trace then g#set_trace true;
+    if verbose then g#set_verbose true;
 
     (match memsize with None -> () | Some memsize -> g#set_memsize memsize);
     (match smp with None -> () | Some smp -> g#set_smp smp);

-- 
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