group.of.nepali.translators team mailing list archive
-
group.of.nepali.translators team
-
Mailing list archive
-
Message #06597
[Bug 1583259] Re: Snappy needs to influence environment variables in applications
Fixed review tools in upstream 0.44 and in 16.10.
** Also affects: click-reviewers-tools (Ubuntu)
Importance: Undecided
Status: New
** Also affects: click-reviewers-tools (Ubuntu Xenial)
Importance: Undecided
Status: New
** Also affects: click-reviewers-tools (Ubuntu Yakkety)
Importance: Undecided
Status: New
** Changed in: click-reviewers-tools
Status: Fix Committed => Fix Released
** Changed in: click-reviewers-tools (Ubuntu Yakkety)
Status: New => Fix Released
--
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1583259
Title:
Snappy needs to influence environment variables in applications
Status in Canonical Click Reviewers tools:
Fix Released
Status in Snappy Launcher:
Invalid
Status in Snapcraft:
Triaged
Status in Snappy:
New
Status in click-reviewers-tools package in Ubuntu:
Fix Released
Status in click-reviewers-tools source package in Xenial:
New
Status in click-reviewers-tools source package in Yakkety:
Fix Released
Bug description:
[Impact]
* Adding an environment keyword to snapcraft.yaml, which will make it to snap.yaml which the launcher will use to setup the environment.
* This reduces the amount of wrapper files.
[Test Case]
1. Run `snapcraft` on the ros demo.
2. Install the snap.
3. snap should run. (if it doesn't it mostly likely means the environent was setup incorrectly).
4. snap.yaml's `assumes` gets a `snap-run` tag.
[Regression Potential]
* Very low. Environment that was previously setup by wrapper scripts could be missing when the launcher launches using the environment keyword.
* The use of `assumes` will make sure this doesn't break people on older versions of snapd or snap-run
--
We see a common pattern across many snaps, all apps are really using
wrappers to set environment variables. I'd like to propose that this
is exposed as first class feature in snapcraft (same like plugs and
slots), snappy (where interfaces can affect variables and snappy can
have sensible defaults) and ubuntu-core-launcher (to actually apply
those variables to each started process).
As a bit of context, this is a wrapper for a non trivial but still
common app: the calculator:
https://bazaar.launchpad.net/~ubuntu-desktop/+junk/gnome-calculator-
snap/view/head:/calc#L3
The wrapper is 44 lines long, all of which set up environment
variables.
Support environment variable that would be available to snaps. The
form should look like
snapcraft.yaml
name: ...
version: ...
...
environment: # these apply to all snaps
ENV1: value1
ENV2: value2
apps:
app1:
...
environment:
ENV1: value1 # takes precedence over global ones
These environment values would be transported to snap.yaml
To manage notifications about this bug go to:
https://bugs.launchpad.net/click-reviewers-tools/+bug/1583259/+subscriptions