[libvirt PATCH 1/2] network: Drop UUID handling for default network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We are generating a fresh UUID and storing it in the XML for the
default network, but this is unnecessary because the network
driver will automatically generate one if it's missing from the
XML; the fact that we only do this if the uuidgen command happens
to be available on the build machine is further proof that we can
safely skip this step.

This patch is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/network/meson.build | 32 +++++++-------------------------
 1 file changed, 7 insertions(+), 25 deletions(-)

diff --git a/src/network/meson.build b/src/network/meson.build
index 13dd2c26b2..3ec598c3f9 100644
--- a/src/network/meson.build
+++ b/src/network/meson.build
@@ -84,31 +84,13 @@ if conf.has('WITH_NETWORK')
     runstatedir / 'libvirt' / 'network',
   ]
 
-  uuidgen_prog = find_program('uuidgen', required: false)
-
-  if uuidgen_prog.found()
-    uuid = run_command(uuidgen_prog).stdout().strip()
-
-    configure_file(
-      input: 'default.xml.in',
-      output: '@BASENAME@',
-      command: [
-        'sed', '-e', 's|</name>|</name>\\n  <uuid>@0@</uuid>|'.format(uuid),
-        '@INPUT@',
-      ],
-      capture: true,
-      install: true,
-      install_dir: confdir / 'qemu' / 'networks',
-    )
-  else
-    configure_file(
-      input: 'default.xml.in',
-      output: '@BASENAME@',
-      copy: true,
-      install: true,
-      install_dir: confdir / 'qemu' / 'networks',
-    )
-  endif
+  configure_file(
+    input: 'default.xml.in',
+    output: '@BASENAME@',
+    copy: true,
+    install: true,
+    install_dir: confdir / 'qemu' / 'networks',
+  )
 
   meson.add_install_script(
     meson_python_prog.path(), python3_prog.path(), meson_install_symlink_prog.path(),
-- 
2.26.2




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux