Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-03-03 10:12:05 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-03-03 10:12:05 (GMT)
commit7c0efa11c0775dde4161fe54f0f4eb8dcfe8bf9c (patch)
tree4b919be1548d36dc894865f2289888f9982439aa /src/sugar
parente15c6e1c97102e4d2065a9a6e1a3f3cf45e5cd4e (diff)
Restore minimal .xol support #459
Diffstat (limited to 'src/sugar')
-rw-r--r--src/sugar/bundle/contentbundle.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/sugar/bundle/contentbundle.py b/src/sugar/bundle/contentbundle.py
index a95ed61..d00936a 100644
--- a/src/sugar/bundle/contentbundle.py
+++ b/src/sugar/bundle/contentbundle.py
@@ -1,4 +1,5 @@
# Copyright (C) 2007, Red Hat, Inc.
+# Copyright (C) 2009 Aleksey Lim
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -197,17 +198,32 @@ class ContentBundle(Bundle):
def get_start_uri(self):
return "file://" + urllib.pathname2url(self.get_start_path())
+ # TODO treat ContentBundle in special way
+ # needs rethinking while fixing ContentBundle support
+ def get_bundle_id(self):
+ return self._bundle_class
+
+ # TODO treat ContentBundle in special way
+ # needs rethinking while fixing ContentBundle support
+ def get_activity_version(self):
+ return self._library_version
+
def is_installed(self):
if self._zip_file is None:
return True
elif os.path.isdir(self.get_root_dir()):
- return True
+ return ContentBundle(self.get_root_dir()).get_library_version() \
+ == self.get_library_version()
else:
return False
- def install(self):
- self._unzip(env.get_user_library_path())
+ def install(self, install_path):
+ # TODO ignore passed install_path argument
+ # needs rethinking while fixing ContentBundle support
+ install_path = env.get_user_library_path()
+ self._unzip(install_path)
self._run_indexer()
+ return self.get_root_dir()
def uninstall(self):
if self._zip_file is None: