summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-22 18:15:40 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-22 18:22:40 -0300
commita7253fc32412e2e8932c99bbe7f619419e0a21bc (patch)
tree1507afc40bc894b5c9765ee92bc4191938e1b518
parentf8556f040ddc966a138d881075f6cb78823f3c41 (diff)
downloadabslibre-a7253fc32412e2e8932c99bbe7f619419e0a21bc.tar.gz
abslibre-a7253fc32412e2e8932c99bbe7f619419e0a21bc.tar.bz2
abslibre-a7253fc32412e2e8932c99bbe7f619419e0a21bc.zip
virt-install: keep only "Generic" option
-rw-r--r--libre/virt-manager/PKGBUILD5
-rw-r--r--libre/virt-manager/libre.patch64
2 files changed, 45 insertions, 24 deletions
diff --git a/libre/virt-manager/PKGBUILD b/libre/virt-manager/PKGBUILD
index 82a8a62a0..d518fa99b 100644
--- a/libre/virt-manager/PKGBUILD
+++ b/libre/virt-manager/PKGBUILD
@@ -23,14 +23,11 @@ makedepends=('intltool>=0.35.0'
source=("https://virt-manager.org/download/sources/virt-manager/virt-manager-$pkgver.tar.gz"
'libre.patch')
sha256sums=('bf31a40cc48500cbf87a0e93a5838fc3f6ce4e2fa03f8bce6aa2615625e6caca'
- 'fcc47de76956ebf66386ad80c6836df72622d8fdc4eca98cbbacf6fc87d251a3')
+ 'ef5bb53e02254e31f084aef1a66f249aa3fdf48161e643682c25342ddd235433')
prepare() {
cd "$srcdir/$pkgbase-$pkgver"
patch -p1 -i ../libre.patch
- sed -i '\|msgid ["]Linux["]| s|Linux|GNU/Linux|g
- \|msgstr ["]Linux["]| s|Linux|GNU/Linux|g
- ' po/*
}
build() {
diff --git a/libre/virt-manager/libre.patch b/libre/virt-manager/libre.patch
index 6f20d008d..bc2b49b84 100644
--- a/libre/virt-manager/libre.patch
+++ b/libre/virt-manager/libre.patch
@@ -168,18 +168,39 @@ index 6cb9cc0..21de8cf 100644
("root hub" in str(xmlobj.product_name) or
("host controller" in str(xmlobj.product_name).lower() and
diff --git a/virtManager/create.py b/virtManager/create.py
-index 737c1fa..4ff52ec 100644
+index 737c1fa..2b99de8 100644
--- a/virtManager/create.py
+++ b/virtManager/create.py
-@@ -1077,7 +1077,7 @@ class vmmCreate(vmmGObjectUI):
+@@ -931,9 +931,7 @@ class vmmCreate(vmmGObjectUI):
+ model = widget.get_model()
+ model.clear()
+
+- # Kind of a hack, just show linux + windows by default since
+- # that's all 98% of people care about
+- supportl = ["generic", "linux", "windows"]
++ supportl = ["generic"]
+
+ # Move 'generic' to the front of the list
+ types = virtinst.OSDB.list_types()
+@@ -1075,17 +1073,7 @@ class vmmCreate(vmmGObjectUI):
+ install = _("Operating system container")
+
osstr = ""
- have_os = True
- if self._guest.os.is_container():
+- have_os = True
+- if self._guest.os.is_container():
- osstr = _("Linux")
-+ osstr = _("GNU/Linux")
- elif not distro:
- osstr = _("Generic")
- have_os = False
+- elif not distro:
+- osstr = _("Generic")
+- have_os = False
+- elif not version:
+- osstr = _("Generic") + " " + dlabel
+- have_os = False
+- else:
+- osstr = vlabel
++ have_os = False
+
+ self.widget("finish-warn-os").set_visible(not have_os)
+ self.widget("summary-os").set_text(osstr)
diff --git a/virtinst/guest.py b/virtinst/guest.py
index 6a42536..e774d47 100644
--- a/virtinst/guest.py
@@ -193,7 +214,7 @@ index 6a42536..e774d47 100644
dev = VirtualChannelDevice(self.conn)
dev.type = "unix"
diff --git a/virtinst/osdict.py b/virtinst/osdict.py
-index e8c1487..5f220f6 100644
+index e8c1487..a9e47cf 100644
--- a/virtinst/osdict.py
+++ b/virtinst/osdict.py
@@ -61,12 +61,6 @@ def _remove_older_point_releases(distro_list):
@@ -209,7 +230,7 @@ index e8c1487..5f220f6 100644
return ret
-@@ -134,49 +128,8 @@ class _OSDB(object):
+@@ -134,49 +128,7 @@ class _OSDB(object):
# This is only for back compatibility with pre-libosinfo support.
# This should never change.
_aliases = {
@@ -252,14 +273,14 @@ index e8c1487..5f220f6 100644
- "winxp64" : "winxp",
-
# Old --os-type values
- "linux" : "generic",
+- "linux" : "generic",
- "windows" : "winxp",
- "solaris" : "solaris10",
- "unix": "freebsd9.0",
"other": "generic",
}
-@@ -232,17 +185,11 @@ class _OSDB(object):
+@@ -232,17 +184,11 @@ class _OSDB(object):
return None
osname = ret[0].get_short_id()
@@ -274,11 +295,11 @@ index e8c1487..5f220f6 100644
def list_types(self):
- approved_types = ["linux", "windows", "unix",
- "solaris", "other", "generic"]
-+ approved_types = ["linux", "generic"]
++ approved_types = ["generic"]
return approved_types
def list_os(self, typename=None, only_supported=False, sortpref=None):
-@@ -265,13 +212,6 @@ class _OSDB(object):
+@@ -265,13 +211,6 @@ class _OSDB(object):
return _sort(sortmap, sortpref=sortpref,
limit_point_releases=only_supported)
@@ -292,7 +313,7 @@ index e8c1487..5f220f6 100644
#####################
# OsVariant classes #
-@@ -287,7 +227,6 @@ class _OsVariant(object):
+@@ -287,7 +226,6 @@ class _OsVariant(object):
self.codename = self._os and self._os.get_codename() or ""
self.sortby = self._get_sortby()
@@ -300,7 +321,7 @@ index e8c1487..5f220f6 100644
self._supported = None
-@@ -363,34 +302,6 @@ class _OsVariant(object):
+@@ -363,34 +301,6 @@ class _OsVariant(object):
return (datetime.datetime.strptime(eol_date, "%Y-%m-%d") >
datetime.datetime.now())
@@ -335,10 +356,13 @@ index e8c1487..5f220f6 100644
###############
# Public APIs #
-@@ -411,36 +322,13 @@ class _OsVariant(object):
- if self._family in ['linux']:
- return "linux"
+@@ -408,39 +318,13 @@ class _OsVariant(object):
+ if not self._os:
+ return "generic"
+- if self._family in ['linux']:
+- return "linux"
+-
- if self._family in ['win9x', 'winnt', 'win16']:
- return "windows"
-
@@ -373,7 +397,7 @@ index e8c1487..5f220f6 100644
def default_netmodel(self):
"""
Default non-virtio net-model, since we check for that separately
-@@ -499,37 +387,16 @@ class _OsVariant(object):
+@@ -499,37 +383,16 @@ class _OsVariant(object):
return False