[gnome-boxes/gnome-3-6] fedora,express: Port script for Fedora 18
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/gnome-3-6] fedora,express: Port script for Fedora 18
- Date: Thu, 10 Jan 2013 21:54:50 +0000 (UTC)
commit 88bad823ee4e1d3dd20fc38fd327168a408c1eae
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jan 10 23:25:30 2013 +0200
fedora,express: Port script for Fedora 18
Package groups have changed in Fedora 18. This patch makes the script
work against Fedora 18 without breaking it against older releases.
https://bugzilla.gnome.org/show_bug.cgi?id=689221
data/fedora.ks | 8 +-------
src/fedora-installer.vala | 24 ++++++++++++++++++++++++
2 files changed, 25 insertions(+), 7 deletions(-)
---
diff --git a/data/fedora.ks b/data/fedora.ks
index 1aa3359..a36c696 100644
--- a/data/fedora.ks
+++ b/data/fedora.ks
@@ -23,13 +23,7 @@ reboot
%packages
- base
- core
- hardware-support
- base-x
- gnome-desktop
- graphical-internet
- sound-and-video
+BOXES_FEDORA_PACKAGES
# QXL video driver and SPICE vdagent
xorg-x11-drv-qxl
diff --git a/src/fedora-installer.vala b/src/fedora-installer.vala
index 35b85aa..6473fa4 100644
--- a/src/fedora-installer.vala
+++ b/src/fedora-installer.vala
@@ -1,16 +1,34 @@
// This file is part of GNOME Boxes. License: LGPLv2+
private class Boxes.FedoraInstaller: UnattendedInstaller {
+ public const string PRE_F18_PACKAGES = "@base\n" +
+ "@core\n" +
+ "@hardware-support\n" +
+ "@base-x\n" +
+ "@gnome-desktop\n" +
+ "@graphical-internet\n" +
+ "@sound-and-video";
+ public const string F18_PACKAGES = "@standard\n" +
+ "@core\n" +
+ "@hardware-support\n" +
+ "@base-x\n" +
+ "@gnome-desktop\n" +
+ "@epiphany\n" +
+ "@firefox\n" +
+ "@multimedia";
+
private File kernel_file;
private File initrd_file;
private string kbd;
private static Regex kbd_regex;
+ private static Regex packages_regex;
static construct {
try {
kbd_regex = new Regex ("BOXES_FEDORA_KBD");
+ packages_regex = new Regex ("BOXES_FEDORA_PACKAGES");
} catch (RegexError error) {
// This just can't fail
assert_not_reached ();
@@ -67,6 +85,12 @@ private class Boxes.FedoraInstaller: UnattendedInstaller {
protected override string fill_unattended_data (string data) throws RegexError {
var str = base.fill_unattended_data (data);
+ var version = int.parse (os.version);
+ if (version < 18)
+ str = packages_regex.replace (str, str.length, 0, PRE_F18_PACKAGES);
+ else
+ str = packages_regex.replace (str, str.length, 0, F18_PACKAGES);
+
return kbd_regex.replace (str, str.length, 0, kbd);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]