-
Notifications
You must be signed in to change notification settings - Fork 0
/
gnome-boxes-disable-gudev.patch
111 lines (95 loc) · 3.46 KB
/
gnome-boxes-disable-gudev.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
--- a/configure.ac 2017-06-06 16:11:53.011863776 +0100
+++ b/configure.ac 2017-06-06 16:12:04.855986701 +0100
@@ -79,7 +79,6 @@
libxml-2.0 >= $LIBXML2_MIN_VERSION
libusb-1.0 >= $LIBUSB_MIN_VERSION
spice-client-gtk-3.0 >= $SPICE_GTK_MIN_VERSION
- gudev-1.0 >= $GUDEV_MIN_VERSION
libosinfo-1.0 >= $OSINFO_MIN_VERSION
uuid >= $UUID_REQUIRED
libsoup-2.4 >= $LIBSOUP_REQUIRED
@@ -140,7 +140,6 @@
glib-2.0
gtk+-3.0
gtk-vnc-2.0
- gudev-1.0
libarchive
libosinfo-1.0
libsoup-2.4
--- a/src/installer-media.vala 2017-06-06 15:58:26.991849922 +0100
+++ b/src/installer-media.vala 2017-06-06 16:11:00.247315838 +0100
@@ -1,7 +1,7 @@
// This file is part of GNOME Boxes. License: LGPLv2+
using Osinfo;
-using GUdev;
+//using GUdev;
using GVirConfig;
private class Boxes.InstallerMedia : GLib.Object {
@@ -63,16 +63,16 @@
public async InstallerMedia.for_path (string path,
MediaManager media_manager,
Cancellable? cancellable) throws GLib.Error {
- var device = yield get_device_from_path (path, media_manager.client, cancellable);
+// var device = yield get_device_from_path (path, media_manager.client, cancellable);
- if (device != null)
- yield get_media_info_from_device (device, media_manager.os_db);
- else {
+// if (device != null)
+// yield get_media_info_from_device (device, media_manager.os_db);
+// else {
from_image = true;
os_media = yield media_manager.os_db.guess_os_from_install_media_path (device_file, cancellable);
if (os_media != null)
os = os_media.os;
- }
+// }
label_setup ();
@@ -171,6 +171,7 @@
}
}
+#if 0
private async GUdev.Device? get_device_from_path (string path, Client client, Cancellable? cancellable) {
try {
var mount_dir = File.new_for_path (path);
@@ -253,6 +254,7 @@
return decoded;
}
+#endif
private void eject_cdrom_media (Domain domain) {
var devices = domain.get_devices ();
--- a/src/media-manager.vala 2017-07-20 18:48:50.169930142 +0100
+++ b/src/media-manager.vala 2017-07-20 18:50:41.546895595 +0100
@@ -1,14 +1,14 @@
// This file is part of GNOME Boxes. License: LGPLv2+
using Osinfo;
-using GUdev;
+//using GUdev;
using Tracker;
private class Boxes.MediaManager : Object {
private static MediaManager media_manager;
public OSDatabase os_db { get; private set; }
- public Client client { get; private set; }
+// public Client client { get; private set; }
public delegate void InstallerRecognized (Osinfo.Media os_media, Osinfo.Os os);
@@ -88,6 +88,7 @@
public async GLib.List<InstallerMedia> list_installer_medias () {
var list = new GLib.List<InstallerMedia> ();
+#if 0
// First HW media
var enumerator = new GUdev.Enumerator (client);
// We don't want to deal with partitions to avoid duplicate medias
@@ -117,6 +118,7 @@
warning ("Failed to get information on device '%s': %s. Ignoring..", path, error.message);
}
}
+#endif
if (connection == null)
return list;
@@ -181,7 +183,7 @@
}
private MediaManager () {
- client = new GUdev.Client ({"block"});
+// client = new GUdev.Client ({"block"});
os_db = new OSDatabase ();
os_db.load.begin ();
try {