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

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