1
0
mirror of https://src.fedoraproject.org/rpms/virt-manager.git synced 2025-07-16 17:14:53 +00:00

Set default disk image dir to /var/lib/libvirt/images

This commit is contained in:
Daniel P. Berrange
2008-05-09 17:56:14 +00:00
parent e081cd37fd
commit 330b912302
2 changed files with 37 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
diff -rup virt-manager-0.5.4.orig/src/virtManager/config.py virt-manager-0.5.4.new/src/virtManager/config.py
--- virt-manager-0.5.4.orig/src/virtManager/config.py 2008-03-10 20:17:51.000000000 -0400
+++ virt-manager-0.5.4.new/src/virtManager/config.py 2008-05-09 13:42:21.000000000 -0400
@@ -37,6 +37,9 @@ CONSOLE_KEYGRAB_MOUSEOVER = 2
DEFAULT_XEN_IMAGE_DIR = "/var/lib/xen/images"
DEFAULT_XEN_SAVE_DIR = "/var/lib/xen/dump"
+DEFAULT_VIRT_IMAGE_DIR = "/var/lib/libvirt/images"
+DEFAULT_VIRT_SAVE_DIR = "/var/lib/libvirt"
+
class vmmConfig:
def __init__(self, appname, appversion, gconf_dir, glade_dir, icon_dir, data_dir):
self.appname = appname
@@ -332,12 +335,16 @@ class vmmConfig:
def get_default_image_dir(self, connection):
if connection.get_type() == "Xen":
return DEFAULT_XEN_IMAGE_DIR
+ elif os.access(DEFAULT_VIRT_IMAGE_DIR, os.W_OK):
+ return DEFAULT_VIRT_IMAGE_DIR
else:
return os.getcwd()
def get_default_save_dir(self, connection):
if connection.get_type() == "Xen":
return DEFAULT_XEN_SAVE_DIR
+ elif os.access(DEFAULT_VIRT_SAVE_DIR, os.W_OK):
+ return DEFAULT_VIRT_SAVE_DIR
else:
return os.getcwd()

View File

@@ -8,7 +8,7 @@
Name: virt-manager Name: virt-manager
Version: 0.5.4 Version: 0.5.4
Release: 3%{_extra_release} Release: 4%{_extra_release}
Summary: Virtual Machine Manager Summary: Virtual Machine Manager
Group: Applications/Emulators Group: Applications/Emulators
@@ -19,6 +19,7 @@ Source1: %{name}.pam
Source2: %{name}.console Source2: %{name}.console
Patch1: %{name}-%{version}-polkit-root.patch Patch1: %{name}-%{version}-polkit-root.patch
Patch2: %{name}-%{version}-i18n.patch Patch2: %{name}-%{version}-i18n.patch
Patch3: %{name}-%{version}-image-dir.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# These two are just the oldest version tested # These two are just the oldest version tested
@@ -38,7 +39,7 @@ Requires: gnome-python2-gnomekeyring >= 2.15.4
# Minimum we've tested with # Minimum we've tested with
Requires: libxml2-python >= 2.6.23 Requires: libxml2-python >= 2.6.23
# Required to install Xen guests # Required to install Xen guests
Requires: python-virtinst >= 0.300.2 Requires: python-virtinst >= 0.300.3-6.fc9
# Required for loading the glade UI # Required for loading the glade UI
Requires: pygtk2-libglade Requires: pygtk2-libglade
# Required for our graphics which are currently SVG format # Required for our graphics which are currently SVG format
@@ -72,6 +73,7 @@ API.
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
%build %build
%configure %configure
@@ -162,6 +164,9 @@ fi
%{_datadir}/dbus-1/services/%{name}.service %{_datadir}/dbus-1/services/%{name}.service
%changelog %changelog
* Fri May 9 2008 Daniel P. Berrange <berrange@redhat.com> - 0.5.4-4.fc9
- Default disk images to /var/lib/libvirt/images
* Thu Apr 3 2008 Daniel P. Berrange <berrange@redhat.com> - 0.5.4-3.fc9 * Thu Apr 3 2008 Daniel P. Berrange <berrange@redhat.com> - 0.5.4-3.fc9
- Updated sr, de, fi, it, pl translations - Updated sr, de, fi, it, pl translations