From a6cf0d510093d84aa837525fe7ddef9f97c01fbe Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Sun, 11 Nov 2012 13:42:46 +0000 Subject: Allow to specify a check name It's useful for python checks for example, where the check is more than just a name. Still use check if check_name doesn't exist mostly to avoid a bunch of changes to the json. --- diff --git a/scripts/check-system b/scripts/check-system index f1f6622..d62d4a2 100755 --- a/scripts/check-system +++ b/scripts/check-system @@ -89,9 +89,9 @@ def run_checks(distro, checks, packages): to_install = [] for check in checks: - check_name = check["check"] checker = checkers[check["checker"]] - if checker(check_name): + if checker(check["check"]): + check_name = check.get("check_name", check["check"]) if distro in packages[check_name]: package = packages[check_name][distro] diff --git a/scripts/deps/packages.json b/scripts/deps/packages.json index 6168174..9e094a8 100644 --- a/scripts/deps/packages.json +++ b/scripts/deps/packages.json @@ -82,52 +82,52 @@ "espeak": { "fedora": "espeak", "ubuntu": "espeak" }, - "import wnck": + "wnck python": { "fedora": "gnome-python2-libwnck", "ubuntu": "python-wnck" }, - "import simplejson": + "simplejson python": { "fedora": "python-simplejson", "ubuntu": "python-simplejson" }, - "import hippo": + "hippo python": { "fedora": "hippo-canvas-python", "ubuntu": "python-hippocanvas" }, - "import telepathy": + "telepathy python": { "fedora": "python-telepathy", "ubuntu": "python-telepathy" }, - "import xapian": + "xapian python": { "fedora": "xapian-bindings-python", "ubuntu": "python-xapian" }, - "import dateutil": + "dateutil python": { "fedora": "python-dateutil", "ubuntu": "python-dateutil" }, - "import gtksourceview2": + "gtksourceview2 python": { "fedora": "pygtksourceview", "ubuntu": "python-gtksourceview2" }, - "import vte": + "vte python": { "fedora": "vte", "ubuntu": "python-vte" }, - "import decorator": + "decorator python": { "fedora": "python-decorator", "ubuntu": "python-decorator" }, - "import gi": + "gi python": { "fedora": "pygobject3", "ubuntu": "pygobject" }, - "from gi.repository import EvinceDocument": + "evince typelib": { "fedora": "evince-libs", "ubuntu": "gir1.2-evince-3.0" }, - "from gi.repository import GtkSource": + "gtksource typelib": { "fedora": "gtksourceview3", "ubuntu": "gir1.2-gtksource-3.0" }, - "from gi.repository import GConf": + "gconf typelib": { "fedora": "GConf2", "ubuntu": "gir1.2-gconf-2.0" }, - "from gi.repository import Gst": + "gst typelib": { "fedora": "gstreamer", "ubuntu": "gir1.2-gstreamer-1.0" }, - "from gi.repository import Wnck": + "wnck typelib": { "fedora": "libwnck3", "ubuntu": "gir1.2-wnck-3.0" }, - "import rsvg": + "rsvg python": { "fedora": "gnome-python2-rsvg", "ubuntu": "python-rsvg" }, "org.freedesktop.Telepathy.ConnectionManager.gabble": @@ -136,19 +136,19 @@ "org.freedesktop.Telepathy.ConnectionManager.salut": { "fedora": "telepathy-salut", "ubuntu": "telepathy-salut" }, - "from gi.repository import WebKit": + "webkit typelib": { "fedora": "webkitgtk3", "ubuntu": "gir1.2-webkit-3.0" }, - "import pygst": + "pygst python": { "fedora": "gstreamer-python", "ubuntu": "python-gst0.10" }, - "from gi.repository import Vte": + "vte typelib": { "fedora": "vte3", "ubuntu": "gir1.2-vte-2.90" }, "video4linux2": { "fedora": "gstreamer-plugins-good", "ubuntu": "gstreamer0.10-plugins-good" }, - "import abiword": + "abiword python": { "fedora": "pyabiword", "ubuntu": null }, "c++": @@ -178,7 +178,7 @@ "xkbfile": { "fedora": "libxkbfile-devel", "ubuntu": "libxkbfile-dev" }, - "espeak/speak_lib.h": + "espeak devel": { "fedora": "espeak-devel", "ubuntu": "libespeak-dev" }, "libxml-2.0": @@ -193,7 +193,7 @@ "dbus-launch": { "fedora": "dbus-x11", "ubuntu": "dbus-x11" }, - "import pyatspi": + "pyatspi python": { "fedora": "pyatspi", "ubuntu": "python-pyatspi2" }, "xrandr": diff --git a/scripts/deps/sugar-build.json b/scripts/deps/sugar-build.json index da6f995..634bd5c 100644 --- a/scripts/deps/sugar-build.json +++ b/scripts/deps/sugar-build.json @@ -4,7 +4,8 @@ "checker": "binary" }, { "check": "dbus-launch", "checker": "binary" }, - { "check": "import pyatspi", + { "check_name": "pyatspi python", + "check": "import pyatspi", "checker": "python" }, { "check": "xrandr", "checker": "pkgconfig" }, diff --git a/scripts/deps/sugar-runtime.json b/scripts/deps/sugar-runtime.json index 6f06a59..574c819 100644 --- a/scripts/deps/sugar-runtime.json +++ b/scripts/deps/sugar-runtime.json @@ -10,49 +10,69 @@ "checker": "metacity-theme" }, { "check": "espeak", "checker": "binary" }, - { "check": "import wnck", + { "check_name": "wnck python", + "check": "import wnck", "checker": "python" }, - { "check": "import simplejson", + { "check_name": "simplejson python", + "check": "import simplejson", "checker": "python" }, - { "check": "import hippo", + { "check_name": "hippo python", + "check": "import hippo", "checker": "python" }, - { "check": "import telepathy", + { "check_name": "telepathy python", + "check": "import telepathy", "checker": "python" }, - { "check": "import xapian", + { "check_name": "xapian python", + "check": "import xapian", "checker": "python" }, - { "check": "import dateutil", + { "check_name": "dateutil python", + "check": "import dateutil", "checker": "python" }, - { "check": "import gtksourceview2", + { "check_name": "gtksourceview2 python", + "check": "import gtksourceview2", "checker": "python" }, - { "check": "import vte", + { "check_name": "vte python", + "check": "import vte", "checker": "python" }, - { "check": "import decorator", + { "check_name": "decorator python", + "check": "import decorator", "checker": "python" }, - { "check": "import gi", + { "check_name": "gi python", + "check": "import gi", "checker": "python" }, - { "check": "from gi.repository import EvinceDocument", + { "check_name": "evince typelib", + "check": "from gi.repository import EvinceDocument", "checker": "python" }, - { "check": "from gi.repository import GtkSource", + { "check_name": "gtksource typelib", + "check": "from gi.repository import GtkSource", "checker": "python" }, - { "check": "from gi.repository import GConf", + { "check_name": "gconf typelib", + "check": "from gi.repository import GConf", "checker": "python" }, - { "check": "from gi.repository import Gst", + { "check_name": "gst typelib", + "check": "from gi.repository import Gst", "checker": "python" }, - { "check": "from gi.repository import Wnck", + { "check_name": "wnck typelib", + "check": "from gi.repository import Wnck", "checker": "python" }, - { "check": "import rsvg", + { "check_name": "rsvg python", + "check": "import rsvg", "checker": "python" }, { "check": "org.freedesktop.Telepathy.ConnectionManager.gabble", "checker": "dbus" }, { "check": "org.freedesktop.Telepathy.ConnectionManager.salut", "checker": "dbus" }, - { "check": "from gi.repository import WebKit", + { "check_name": "webkit typelib", + "check": "from gi.repository import WebKit", "checker": "python" }, - { "check": "import pygst", + { "check_name": "pygst python", + "check": "import pygst", "checker": "python" }, - { "check": "from gi.repository import Vte", + { "check_name": "vte typelib", + "check": "from gi.repository import Vte", "checker": "python" }, { "check": "video4linux2", "checker": "gstreamer" }, - { "check": "import abiword", + { "check_name": "abiword python", + "check": "import abiword", "checker": "python" }] diff --git a/scripts/deps/system.json b/scripts/deps/system.json index ea9e0ff..f9f70b3 100644 --- a/scripts/deps/system.json +++ b/scripts/deps/system.json @@ -16,7 +16,8 @@ "checker": "pkgconfig" }, { "check": "xkbfile", "checker": "pkgconfig" }, - { "check": "espeak/speak_lib.h", + { "check_name": "espeak devel", + "check": "espeak/speak_lib.h", "checker": "include" }, { "check": "libxml-2.0", "checker": "pkgconfig" }] -- cgit v0.9.1