Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
add new "no-wrapper" property to apps #1420
Conversation
| @@ -190,6 +190,10 @@ properties: | ||
| - type: string | ||
| minLength: 1 | ||
| - type: number | ||
| + no-wrapper: |
zyga
Jul 26, 2017
Contributor
Suggestion: make this "wrappers" enum that has possible values "legacy" and "none" as we may be able to provide some kind of useful wrappers later on.
sergiusens
Jul 26, 2017
Collaborator
Agreed, this should be an array of unique elements like build-attributes in parts.
sergiusens
reviewed
Jul 26, 2017
Thanks for the improvement; I agree with @zyga on this and we have long shied away from boolean entries to be future proof. it would be nice to see an integration test that creates a snap and verifies no wrapper is used in the end.
mvo5
referenced this pull request
in snapcore/snapd
Jul 26, 2017
Merged
many: end-to-end support for the bare base snap #3625
| @@ -10,6 +10,8 @@ apps: | ||
| command: binary1 | ||
| binary2: | ||
| command: subdir/binary2 | ||
| + binary-no-wrapper: | ||
| + command: subdir/binary3 |
| @@ -73,6 +73,10 @@ def test_snap(self): | ||
| os.path.join(self.prime_dir, 'bin', 'not-wrapped.wrapper'), | ||
| Not(FileExists())) | ||
| + self.assertThat( | ||
| + os.path.join(self.prime_dir, 'bin', 'command-binary3.wrapper'), |
|
Thanks for the feedback and sorry for my slow reply. I addressed the review feedback now. Please let me know if I can help in any other way. |
| @@ -190,6 +190,13 @@ properties: | ||
| - type: string | ||
| minLength: 1 | ||
| - type: number | ||
| + wrapper: |
| - self._wrap_app(app, apps[app]) | ||
| + wrapper = "legacy" | ||
| + if "wrapper" in apps[app]: | ||
| + wrapper = apps[app]["wrapper"] |
zyga
Aug 9, 2017
Contributor
wrapper = apps[app].get("wrapper", legacy) is shorter
Not sure if snapcraft uses anything that can derive the default from the schema.
|
Hi, thanks for the changes, I was thinking of something more like:
wdyt? |
|
Now that I think of it, it |
mvo5
added some commits
Aug 17, 2017
|
I updated the PR now to follow the suggestion of Gustavo in https://forum.snapcraft.io/t/telling-snapcraft-to-skip-generating-wrapper-scripts/1635/3 - i.e. it is using: |
|
How are things looking? I updated the code based on the feedback that I got from @niemeyer. Please let me know if there is anything else I can do to help this PR along, I need it for snapcore/snapd#3625 so it woudl be great if it could make it to the next snapcraft release. |
added a commit
to mvo5/snappy
that referenced
this pull request
Aug 31, 2017
kyrofa
reviewed
Sep 5, 2017
•
This feels a little odd to have a valid enum value as "". It's an optional field, right? Why not just leave it off in such a case? I can't imagine people will actually use adapter: '' anywhere.
|
Ping on this one. |
sergiusens
dismissed
their
stale review
Sep 20, 2017
review no longer valid
|
Thanks, updated and removed the "" from the enum. |
kyrofa
dismissed
elopio’s
stale review
Sep 28, 2017
Fixes requested have been completed.
kyrofa
approved these changes
Sep 28, 2017
With the changes, this looks great, thanks @mvo5!
mvo5 commentedJul 26, 2017
A RFC branch to fix https://bugs.launchpad.net/snapcraft/+bug/1706575
This allows to specify that no shell wrapper for apps should be generated. This is useful for e.g. statically linked binaries that don't need this anyway.
LP: 1706575