> > // TRANSLATORS: the %s an architecture string
> > fmt.Printf(i18n.G("architecture: %s\n"), snappy.Architecture())
> > // TRANSLATORS: the %s is a comma separated list of framework names
> >
> > === modified file 'release/release.go'
> > --- release/release.go 2015-05-15 13:33:27 +0000
> > +++ release/release.go 2015-07-10 11:47:46 +0000
> > @@ -51,9 +51,18 @@
> > return rel.String()
> > }
> >
> > +// Flavor returns the flavor for the release.
> > +func Flavor() string {
> > + return rel.flavor
> > +}
> > +
> > // Override sets up the release using a Release
> > -func Override(r Release) {
> > - rel = r
> > +func Override(flavor, series, channel string) {
>
> What the purpose of this function? AFAICT its only used in systemimage_test.go. Or is it there to allow overrides in the future? If thats the case, why will we need "overrides"? It seems like the channel.ini gives us the "ubuntu-{core,personal}" information as part of its Setup (or am I missing something)?
>
You forget about u-d-f and obtaining the first oem snap that has all the
info we need ;-)
> > + rel = Release{
> > + flavor: flavor,
> > + series: series,
> > + channel: channel,
> > + }
> > }
> >
> > // Setup is used to initialiaze the release information for the system
> >
> > === modified file 'snappy/systemimage.go'
> > --- snappy/systemimage.go 2015-07-01 14:48:33 +0000
> > +++ snappy/systemimage.go 2015-07-10 11:47:46 +0000
> > @@ -97,7 +98,7 @@
> >
> > // Name returns the name
> > func (s *SystemImagePart) Name() string {
> > - return systemImagePartName
> > + return fmt.Sprintf("ubuntu-%s", release.Flavor())
>
> Yay for this! Makes me wonder if we should move the "ubuntu-" string into release as well so that systemimage.go is a bit more agonstic about (but really minor minor).
>
Maybe so, but we also need to be backwards compatible here; if we can,
I'm all for it!
On Mon, Jul 13, 2015 at 07:04:25AM -0000, Michael Vogt wrote: cmd_info. go' cmd_info. go 2015-07-01 14:56:49 +0000 cmd_info. go 2015-07-10 11:47:46 +0000 ActiveSnapsByTy pe(pkg. TypeCore) ActiveSnapNames ByType( pkg.TypeFramewo rk) ActiveSnapNames ByType( pkg.TypeApp) i18n.G( "release: %s\n"), release) i18n.G( "release: %s\n"), release.String())
> Review: Needs Information
>
> Thanks, this looks good! I have some question inline, probably mostly my own ignorance.
>
> Diff comments:
>
> > === modified file 'cmd/snappy/
> > --- cmd/snappy/
> > +++ cmd/snappy/
> > @@ -90,22 +91,12 @@
> > return nil
> > }
> >
> > -func ubuntuCoreChannel() string {
> > - parts, err := snappy.
> > - if len(parts) == 1 && err == nil {
> > - return parts[0].Channel()
> > - }
> > -
> > - return "unknown"
> > -}
> > -
> > func info() error {
> > - release := ubuntuCoreChannel()
> > frameworks, _ := snappy.
> > apps, _ := snappy.
> >
> > // TRANSLATORS: the %s release string
> > - fmt.Printf(
> > + fmt.Printf(
>
> This is nice (i.e. that all the code above gets killed :)
>
\o/
> > // TRANSLATORS: the %s an architecture string i18n.G( "architecture: %s\n"), snappy. Architecture( )) release. go' test.go. Or is it there to allow overrides in the future? If thats the case, why will we need "overrides"? It seems like the channel.ini gives us the "ubuntu- {core,personal} " information as part of its Setup (or am I missing something)?
> > fmt.Printf(
> > // TRANSLATORS: the %s is a comma separated list of framework names
> >
> > === modified file 'release/
> > --- release/release.go 2015-05-15 13:33:27 +0000
> > +++ release/release.go 2015-07-10 11:47:46 +0000
> > @@ -51,9 +51,18 @@
> > return rel.String()
> > }
> >
> > +// Flavor returns the flavor for the release.
> > +func Flavor() string {
> > + return rel.flavor
> > +}
> > +
> > // Override sets up the release using a Release
> > -func Override(r Release) {
> > - rel = r
> > +func Override(flavor, series, channel string) {
>
> What the purpose of this function? AFAICT its only used in systemimage_
>
You forget about u-d-f and obtaining the first oem snap that has all the
info we need ;-)
> > + rel = Release{ systemimage. go' systemimage. go 2015-07-01 14:48:33 +0000 systemimage. go 2015-07-10 11:47:46 +0000 "ubuntu- %s", release.Flavor())
> > + flavor: flavor,
> > + series: series,
> > + channel: channel,
> > + }
> > }
> >
> > // Setup is used to initialiaze the release information for the system
> >
> > === modified file 'snappy/
> > --- snappy/
> > +++ snappy/
> > @@ -97,7 +98,7 @@
> >
> > // Name returns the name
> > func (s *SystemImagePart) Name() string {
> > - return systemImagePartName
> > + return fmt.Sprintf(
>
> Yay for this! Makes me wonder if we should move the "ubuntu-" string into release as well so that systemimage.go is a bit more agonstic about (but really minor minor).
>
Maybe so, but we also need to be backwards compatible here; if we can,
I'm all for it!
> > } /code.launchpad .net/~sergiusen s/snappy/ rollYourOwnCore Personal/ +merge/ 264405
> >
> > // Origin returns the origin ("ubuntu")
>
>
> --
> https:/
> You are the owner of lp:~sergiusens/snappy/rollYourOwnCorePersonal.