From 0c81f566261279e9ade8f35eb393f0ee709304d5 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Apr 28 2008 20:26:17 +0000 Subject: - Patch to fix system activities location --- diff --git a/activities.patch b/activities.patch new file mode 100644 index 0000000..3ed8a86 --- /dev/null +++ b/activities.patch @@ -0,0 +1,45 @@ +diff --git a/bin/sugar-shell-service.in b/bin/sugar-shell-service.in +index e88ea65..49c2764 100644 +--- a/bin/sugar-shell-service.in ++++ b/bin/sugar-shell-service.in +@@ -16,6 +16,12 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + import sys ++from os import environ ++ ++if not environ.has_key('SUGAR_ACTIVITIES'): ++ environ['SUGAR_ACTIVITIES'] = '@prefix@/share/sugar/activities:' \ ++ '@prefix@/lib64/sugar/activities:' \ ++ '@prefix@/lib/sugar/activities' + + sys.path.insert(0, '@prefix@/share/sugar/service') + +--- sugar-0.79.3/service/bundleregistry.py.activities 2008-04-08 18:30:16.000000000 +0200 ++++ sugar-0.79.3/service/bundleregistry.py 2008-04-28 22:01:24.000000000 +0200 +@@ -27,13 +27,6 @@ + + import config + +-# http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html +-def _get_data_dirs(): +- if os.environ.has_key('XDG_DATA_DIRS'): +- return os.environ['XDG_DATA_DIRS'].split(':') +- else: +- return [ '/usr/local/share/', '/usr/share/' ] +- + def _load_mime_defaults(): + defaults = {} + +@@ -184,8 +177,8 @@ + + _bundle_registry = BundleRegistry() + +-for path in _get_data_dirs(): +- bundles_path = os.path.join(path, 'activities') +- _bundle_registry.add_search_path(bundles_path) ++if os.environ.has_key('SUGAR_ACTIVITIES'): ++ for path in os.environ['SUGAR_ACTIVITIES'].split(':'): ++ _bundle_registry.add_search_path(path) + + _bundle_registry.add_search_path(env.get_user_activities_path()) diff --git a/sugar.spec b/sugar.spec index a8902fe..88487fd 100644 --- a/sugar.spec +++ b/sugar.spec @@ -1,7 +1,7 @@ Summary: OLPC desktop environment Name: sugar -Version: 0.79.4 -Release: 1%{?dist} +Version: 0.79.3 +Release: 2%{?dist} URL: http://dev.laptop.org Source0: http://dev.laptop.org/pub/sugar/sources/%{name}/%{name}-%{version}.tar.bz2 License: GPL/LGPL @@ -21,6 +21,8 @@ Requires: gnome-python2-libwnck Requires: matchbox-window-manager Requires: numpy +Patch1: activities.patch + %description Desktop Environment for the One Laptop Per Child project; see the @@ -30,6 +32,8 @@ goals of this project. %prep %setup -q +%patch1 -p1 -b .activities + %build %configure make @@ -69,9 +73,8 @@ rm -rf %{buildroot} %{_datadir}/mime/packages/sugar.xml %changelog -* Tue Apr 22 2008 Tomeu Vizoso - 0.79.4-1 -- Pylint cleanup. -- Misc graphical fixes. +* Mon Apr 28 2008 Marco Pesenti Gritti - 0.79.3-2 +- Patch to fix system activities location * Wed Apr 09 2008 Tomeu Vizoso - 0.79.3-1 - Misc graphical fixes.