snappy: support generation of short binary names #688

Merged
merged 1 commit into from Mar 21, 2016

Conversation

Projects
None yet
4 participants
Collaborator

mvo5 commented Mar 18, 2016

This branch modifies generateBinaryName to generate a short name if the appname and the snapname match. This prepares the removal of frameworks.

"github.com/ubuntu-core/snappy/snap/snapenv"
)
// generate the name
func generateBinaryName(m *snapYaml, app *AppYaml) string {
var binName string
- if m.Type == snap.TypeFramework {
+ if app.Name == m.Name {
binName = filepath.Base(app.Name)
@niemeyer

niemeyer Mar 18, 2016

Contributor

Slightly surprising to see filepath.Base here. We should never have a path in the app name.

We need to validate those elsewhere if we're not yet doing that.

@zyga

zyga Mar 18, 2016

Contributor

We have that for hooks AFAIR (the only case today)

@zyga

zyga Mar 18, 2016

Contributor

I have a similar function in interfaces WrapperNameForApp. We should de-dupe at some point.

Contributor

niemeyer commented Mar 18, 2016

LGTM!

Contributor

zyga commented Mar 18, 2016

+1

Member

stevenwilkin commented Mar 21, 2016

:shipit:

mvo5 added a commit that referenced this pull request Mar 21, 2016

Merge pull request #688 from mvo5/feature/short-binary-names
snappy: support generation of short binary names

@mvo5 mvo5 merged commit 086441c into snapcore:master Mar 21, 2016

4 checks passed

Integration tests Success 68 tests run, 0 skipped, 0 failed.
Details
autopkgtest Success No test results found.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.02%) to 72.147%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment