diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2012-08-17 23:19:41 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2012-08-17 23:19:41 (GMT) |
commit | 4c80f67788e97674c640f0ea789a8d819daf9ae2 (patch) | |
tree | 508650c14e64f7a5579cdb5403e11d4229033a4d | |
parent | 5a49bbeb3453d46c0121d8d67f045f1aa0ee056e (diff) |
Set proper activity name on launching
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | sugar_network/zerosugar/injector.py | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -13,6 +13,7 @@ - activities migth need MIME registering while checking-in - changed pulls should take into account accept_length - process client configuration in more general manner than client stats sharing +- i18n activity.info's strings 1.0 === diff --git a/sugar_network/zerosugar/injector.py b/sugar_network/zerosugar/injector.py index 72bafd5..af80321 100644 --- a/sugar_network/zerosugar/injector.py +++ b/sugar_network/zerosugar/injector.py @@ -27,6 +27,7 @@ from os.path import join, exists, basename, isabs from zeroinstall.injector import model from zeroinstall.injector.requirements import Requirements +from sweets_recipe import Spec from sugar_network.zerosugar import solver from sugar_network.zerosugar.config import config from sugar_network import local, Client @@ -241,9 +242,12 @@ def _activity_env(selection, environ): if not exists(path): os.makedirs(path) + # TODO Any way to avoid loading spec file? + spec = Spec(root=selection.local_path) + environ['SUGAR_BUNDLE_PATH'] = selection.local_path environ['SUGAR_BUNDLE_ID'] = selection.feed.context - environ['SUGAR_BUNDLE_NAME'] = selection.feed.name + environ['SUGAR_BUNDLE_NAME'] = spec['Activity', 'name'] environ['SUGAR_BUNDLE_VERSION'] = model.format_version(selection.version) environ['SUGAR_ACTIVITY_ROOT'] = root environ['PATH'] = '%s:%s' % \ |