diff --git a/lib/sugar/bundle/contentbundle.py b/lib/sugar/bundle/contentbundle.py index 517ee9a8..9e2d36e4 100644 --- a/lib/sugar/bundle/contentbundle.py +++ b/lib/sugar/bundle/contentbundle.py @@ -21,7 +21,8 @@ from ConfigParser import ConfigParser import os from sugar import env -from sugar.bundle.bundle import Bundle, NotInstalledException +from sugar.bundle.bundle import Bundle, NotInstalledException, \ + MalformedBundleException class ContentBundle(Bundle): """A Sugar content bundle @@ -162,7 +163,7 @@ class ContentBundle(Bundle): def _run_indexer(self): os.spawnlp(os.P_WAIT, 'python', 'python', - os.path.join(env.get_user_library_path(), 'makeIndex.py')) + env.get_prefix_path('share/library-common/make_index.py')) def is_installed(self): if self._unpacked: diff --git a/lib/sugar/env.py b/lib/sugar/env.py index c46b7d07..ea0be7b8 100644 --- a/lib/sugar/env.py +++ b/lib/sugar/env.py @@ -18,7 +18,7 @@ import os -def _get_prefix_path(base, path=None): +def get_prefix_path(base, path=None): if os.environ.has_key('SUGAR_PREFIX'): prefix = os.environ['SUGAR_PREFIX'] else: @@ -78,10 +78,10 @@ def get_user_library_path(): return os.path.expanduser('~/Library') def get_locale_path(path=None): - return _get_prefix_path('share/locale', path) + return get_prefix_path('share/locale', path) def get_bin_path(path=None): - return _get_prefix_path('bin', path) + return get_prefix_path('bin', path) def get_service_path(name): return _get_sugar_path('services', name)