Blame SOURCES/0012-v2v-Move-creation-of-v2v-directory-until-after-optio.patch

0ee30e
From e001191c79e3e890d433fa237deda2332773ab97 Mon Sep 17 00:00:00 2001
0ee30e
From: "Richard W.M. Jones" <rjones@redhat.com>
0ee30e
Date: Tue, 22 Mar 2022 15:36:00 +0000
0ee30e
Subject: [PATCH] v2v: Move creation of v2v directory until after option
0ee30e
 parsing
0ee30e
0ee30e
Only after option parsing does the -v (verbose) option take effect,
0ee30e
and so any debug messages emitted before this point are not seen.  In
0ee30e
particular, debug messages emitted when creating the v2v directory
0ee30e
were lost.  In any case there's no point creating this directory until
0ee30e
nearer the point when we might actually need it.
0ee30e
0ee30e
(cherry picked from commit 88aaf8263ae89a40e72197ba58f08bc777dc59c3)
0ee30e
---
0ee30e
 v2v/v2v.ml | 6 +++---
0ee30e
 1 file changed, 3 insertions(+), 3 deletions(-)
0ee30e
0ee30e
diff --git a/v2v/v2v.ml b/v2v/v2v.ml
0ee30e
index 71dd1c4d..661f2dec 100644
0ee30e
--- a/v2v/v2v.ml
0ee30e
+++ b/v2v/v2v.ml
0ee30e
@@ -37,9 +37,6 @@ open Utils
0ee30e
 let mac_re = PCRE.compile ~anchored:true "([[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2}):(network|bridge|ip):(.*)"
0ee30e
 let mac_ip_re = PCRE.compile ~anchored:true "([[:xdigit:]]|:|\\.)+"
0ee30e
 
0ee30e
-(* Create the temporary directory to control conversion. *)
0ee30e
-let v2vdir = create_v2v_directory ()
0ee30e
-
0ee30e
 let rec main () =
0ee30e
   let set_string_option_once optname optref arg =
0ee30e
     match !optref with
0ee30e
@@ -333,6 +330,9 @@ read the man page virt-v2v(1).
0ee30e
     debug "libvirt version: %d.%d.%d" major minor release
0ee30e
   );
0ee30e
 
0ee30e
+  (* Create the temporary directory to control conversion. *)
0ee30e
+  let v2vdir = create_v2v_directory () in
0ee30e
+
0ee30e
   (* Dereference the arguments. *)
0ee30e
   let args = List.rev !args in
0ee30e
   let input_conn = !input_conn in
0ee30e
-- 
0ee30e
2.31.1
0ee30e