From 2694e6c093e373aade4e448529480d1a52c8bffc Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sun, 11 Nov 2012 14:30:50 +0000 Subject: Drop support for Ubuntu 12.04 Add support for Ubuntu 12.10 and Fedora 18 --- (limited to 'scripts') diff --git a/scripts/check-system b/scripts/check-system index fb80391..5349fb1 100755 --- a/scripts/check-system +++ b/scripts/check-system @@ -160,7 +160,8 @@ def warn_if_unsupported(distro): distro = sysinfo.get_distro_name() -packages = load_deps_json("packages") +packages = load_deps_json("packages-%s" % + sysinfo.get_system_version()) checks = load_deps_json("prerequisites") if not run_checks(distro, checks, packages): diff --git a/scripts/deps/packages.json b/scripts/deps/packages-3.4.json index 253b1f0..253b1f0 100644 --- a/scripts/deps/packages.json +++ b/scripts/deps/packages-3.4.json diff --git a/scripts/deps/packages.json b/scripts/deps/packages-3.6.json index 253b1f0..7a322b5 100644 --- a/scripts/deps/packages.json +++ b/scripts/deps/packages-3.6.json @@ -120,7 +120,7 @@ "ubuntu": "python-decorator" }, "gi python": { "fedora": "pygobject3", - "ubuntu": "pygobject" }, + "ubuntu": "python-gi" }, "evince typelib": { "fedora": "evince-libs", "ubuntu": "gir1.2-evince-3.0" }, diff --git a/scripts/jhbuildrc b/scripts/jhbuildrc index ec17a28..e129091 100644 --- a/scripts/jhbuildrc +++ b/scripts/jhbuildrc @@ -1,4 +1,9 @@ import os +import sys + +sys.path.append(os.path.join(os.getcwd(), "scripts")) + +import sysinfo # HACK Ubuntu 64 bit gobject-introspection is not multilib if os.path.exists("/usr/lib/girepository-1.0"): @@ -25,7 +30,8 @@ def libdir(system=False): interact = not "SUGAR_BUILDBOT" in os.environ use_local_modulesets = True -moduleset = [moduleset_path("system"), +moduleset = [moduleset_path("system-%s" % + sysinfo.get_system_version()), moduleset_path("sugar")] modules = ["meta-system", "meta-sugar"] diff --git a/scripts/modules/system.modules b/scripts/modules/system-3.4.modules index f6f8cf4..f6f8cf4 100644 --- a/scripts/modules/system.modules +++ b/scripts/modules/system-3.4.modules diff --git a/scripts/modules/system-3.6.modules b/scripts/modules/system-3.6.modules new file mode 100644 index 0000000..a389846 --- /dev/null +++ b/scripts/modules/system-3.6.modules @@ -0,0 +1,7 @@ + + + + + + + diff --git a/scripts/sysinfo.py b/scripts/sysinfo.py index 3b9b94b..34f54bc 100644 --- a/scripts/sysinfo.py +++ b/scripts/sysinfo.py @@ -1,13 +1,30 @@ import subprocess +def get_system_version(): + name, version = _get_distro_info() + if (name == "ubuntu" and version == "12.10") or \ + (name == "fedora" and version == "18"): + return "3.6" + else: + return "3.4" + def get_distro_name(): + name, version = _get_distro_info() + return name + +def _get_distro_info(): distro = "unsupported" + version = "unknown" # Fedora try: fedora_release = open("/etc/fedora-release").read().strip() if fedora_release == "Fedora release 17 (Beefy Miracle)": distro = "fedora" + version = "17" + elif fedora_release == "Fedora release 18 (Spherical Cow)": + distro = "fedora" + version = "18" except IOError: pass @@ -16,13 +33,15 @@ def get_distro_name(): distributor = subprocess.check_output(["lsb_release", "-si"]).strip() release = subprocess.check_output(["lsb_release", "-sr"]).strip() - if distributor == "Ubuntu" and release == "12.04": + if distributor == "Ubuntu" and release == "12.10": distro = "ubuntu" + version = "12.10" except OSError: pass arch = subprocess.check_output(["uname", "-i"]).strip() if arch not in ["i386", "i686", "x86_64"]: - distro = "unsupported" + distro = "unsupported" + version = "unknown" - return distro + return distro, version -- cgit v0.9.1