[gnome-boxes] Re-layout custom osinfo db
- From: Zeeshan Ali <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] Re-layout custom osinfo db
- Date: Fri, 7 Oct 2016 11:51:45 +0000 (UTC)
commit afbca52aa14edfd39ec4f2aeffc0e5a749fd4b8f
Author: Zeeshan Ali <zeenix gmail com>
Date: Fri Oct 7 13:49:41 2016 +0200
Re-layout custom osinfo db
We need to change layout of our custom osinfo db to please new libosinfo.
Support for having multiple entries in a single xml file is now deprecated
and we are expected to use a directory.
configure.ac | 1 +
data/Makefile.am | 6 +-----
data/gnome-boxes-logos-db.xml | 41 -----------------------------------------
data/osinfo/Makefile.am | 30 ++++++++++++++++++++++++++++++
data/osinfo/debian-1.0.xml | 9 +++++++++
data/osinfo/fedora-1.xml | 9 +++++++++
data/osinfo/gnome-3.6.xml | 9 +++++++++
data/osinfo/opensuse-10.2.xml | 9 +++++++++
data/osinfo/rhel-4.0.xml | 9 +++++++++
data/osinfo/rhel-5.0.xml | 9 +++++++++
data/osinfo/rhel-6.0.xml | 9 +++++++++
data/osinfo/rhel-7.0.xml | 9 +++++++++
data/osinfo/ubuntu-4.10.xml | 9 +++++++++
src/os-database.vala | 2 +-
src/util.vala | 4 ++--
15 files changed, 116 insertions(+), 49 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ec04d94..f04880a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,6 +188,7 @@ AC_CONFIG_FILES([
data/Makefile
data/org.gnome.Boxes.desktop.in
data/icons/Makefile
+ data/osinfo/Makefile
help/Makefile
libgd/Makefile
po/Makefile.in
diff --git a/data/Makefile.am b/data/Makefile.am
index 0be470d..bf247f4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,5 +1,5 @@
NULL=
-SUBDIRS = icons
+SUBDIRS = icons osinfo
desktopdir = $(datadir)/applications
desktop_in_files = org.gnome.Boxes.desktop.in
@@ -35,9 +35,6 @@ unattendeddir = $(datadir)/gnome-boxes/unattended
unattended_DATA = disk.img \
$(NULL)
-logosdbdir= $(datadir)/gnome-boxes
-logosdb_DATA= gnome-boxes-logos-db.xml
-
disk.img:
rm -f disk.img && qemu-img create -f raw disk.img 1440k && mkfs.msdos -s 1 disk.img
@@ -63,7 +60,6 @@ EXTRA_DIST = \
$(source_DATA) \
$(unattended_DATA) \
$(searchprovider_DATA) \
- $(logosdb_DATA) \
$(service_in_files) \
$(appdata_in_file) \
$(NULL)
diff --git a/data/osinfo/Makefile.am b/data/osinfo/Makefile.am
new file mode 100644
index 0000000..b5e90d0
--- /dev/null
+++ b/data/osinfo/Makefile.am
@@ -0,0 +1,30 @@
+NULL=
+
+debiandir= $(datadir)/gnome-boxes/osinfo/os/debian.org
+debian_DATA= debian-1.0.xml
+
+fedoradir= $(datadir)/gnome-boxes/osinfo/os/fedoraproject.org
+fedora_DATA= fedora-1.xml
+
+opensusedir= $(datadir)/gnome-boxes/osinfo/os/opensuse.org
+opensuse_DATA= opensuse-10.2.xml
+
+ubuntudir= $(datadir)/gnome-boxes/osinfo/os/ubuntu.com
+ubuntu_DATA= ubuntu-4.10.xml
+
+gnomedir= $(datadir)/gnome-boxes/osinfo/os/gnome.org
+gnome_DATA= gnome-3.6.xml
+
+redhatdir= $(datadir)/gnome-boxes/osinfo/os/redhat.com
+redhat_DATA= rhel-5.0.xml \
+ rhel-6.0.xml \
+ rhel-7.0.xml \
+ $(NULL)
+
+EXTRA_DIST = $(debian_DATA) \
+ $(fedora_DATA) \
+ $(opensuse_DATA) \
+ $(ubuntu_DATA) \
+ $(gnome_DATA) \
+ $(redhat_DATA) \
+ $(NULL)
diff --git a/data/osinfo/debian-1.0.xml b/data/osinfo/debian-1.0.xml
new file mode 100644
index 0000000..198c546
--- /dev/null
+++ b/data/osinfo/debian-1.0.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://debian.org/debian/1.0">
+ <logo>https://www.debian.org/logos/openlogo-nd.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/fedora-1.xml b/data/osinfo/fedora-1.xml
new file mode 100644
index 0000000..5157761
--- /dev/null
+++ b/data/osinfo/fedora-1.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://fedoraproject.org/fedora/1">
+ <logo>https://people.gnome.org/~zeeshanak/logos/fedora.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/gnome-3.6.xml b/data/osinfo/gnome-3.6.xml
new file mode 100644
index 0000000..8756aa6
--- /dev/null
+++ b/data/osinfo/gnome-3.6.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://gnome.org/gnome/3.6">
+ <logo>https://people.gnome.org/~zeeshanak/logos/gnome-logo.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/opensuse-10.2.xml b/data/osinfo/opensuse-10.2.xml
new file mode 100644
index 0000000..fe17619
--- /dev/null
+++ b/data/osinfo/opensuse-10.2.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://opensuse.org/opensuse/10.2">
+ <logo>https://people.gnome.org/~zeeshanak/logos/opensuse.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/rhel-4.0.xml b/data/osinfo/rhel-4.0.xml
new file mode 100644
index 0000000..2839687
--- /dev/null
+++ b/data/osinfo/rhel-4.0.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://redhat.com/rhel/4.0">
+ <logo>https://people.gnome.org/~zeeshanak/logos/shadownman-pill.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/rhel-5.0.xml b/data/osinfo/rhel-5.0.xml
new file mode 100644
index 0000000..43ebfb3
--- /dev/null
+++ b/data/osinfo/rhel-5.0.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://redhat.com/rhel/5.0">
+ <logo>https://people.gnome.org/~zeeshanak/logos/shadownman-pill.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/rhel-6.0.xml b/data/osinfo/rhel-6.0.xml
new file mode 100644
index 0000000..75a962a
--- /dev/null
+++ b/data/osinfo/rhel-6.0.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://redhat.com/rhel/6.0">
+ <logo>https://people.gnome.org/~zeeshanak/logos/shadownman-pill.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/rhel-7.0.xml b/data/osinfo/rhel-7.0.xml
new file mode 100644
index 0000000..2ce523d
--- /dev/null
+++ b/data/osinfo/rhel-7.0.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://redhat.com/rhel/7.0">
+ <logo>https://people.gnome.org/~zeeshanak/logos/shadownman-pill.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/data/osinfo/ubuntu-4.10.xml b/data/osinfo/ubuntu-4.10.xml
new file mode 100644
index 0000000..e4f5d62
--- /dev/null
+++ b/data/osinfo/ubuntu-4.10.xml
@@ -0,0 +1,9 @@
+<libosinfo version="0.0.1">
+
+ <!-- Please read README.logos for any questions about usage of product logos in Boxes. !-->
+
+ <os id="http://ubuntu.com/ubuntu/4.10">
+ <logo>https://people.gnome.org/~zeeshanak/logos/ubuntu.svg</logo>
+ </os>
+
+</libosinfo>
diff --git a/src/os-database.vala b/src/os-database.vala
index 69df942..d927e29 100644
--- a/src/os-database.vala
+++ b/src/os-database.vala
@@ -42,7 +42,7 @@ private class Boxes.OSDatabase : GLib.Object {
warning ("Error loading default libosinfo database: %s", e.message);
}
try {
- yield App.app.async_launcher.launch (() => { loader.process_path (get_logos_db ()); }); // Load
our custom database
+ yield App.app.async_launcher.launch (() => { loader.process_path (get_custom_osinfo_db ()); });
// Load our custom database
} catch (GLib.Error e) {
warning ("Error loading GNOME Boxes libosinfo database: %s", e.message);
}
diff --git a/src/util.vala b/src/util.vala
index a12cd67..f6d8f38 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -29,8 +29,8 @@ namespace Boxes {
return Path.build_filename (get_pkgdata (), "sources", file_name);
}
- public string get_logos_db () {
- return get_pkgdata ("gnome-boxes-logos-db.xml");
+ public string get_custom_osinfo_db () {
+ return get_pkgdata ("osinfo");
}
public string get_user_unattended (string? file_name = null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]