Merge lp:~chipaca/snapweb/build-again-plz into lp:~snappy-dev/snapweb/trunk

Proposed by John Lenton on 2015-09-26
Status: Needs review
Proposed branch: lp:~chipaca/snapweb/build-again-plz
Merge into: lp:~snappy-dev/snapweb/trunk
Prerequisite: lp:~stephen-stewart/snapweb/use-correct-version-for-post-css-bemlinter
Diff against target: 164 lines (+20/-26)
4 files modified
dependencies.tsv (+3/-2)
oem/oem.go (+4/-3)
pkg/meta/package.yaml (+1/-1)
snappy/converge.go (+12/-20)
To merge this branch: bzr merge lp:~chipaca/snapweb/build-again-plz
Reviewer Review Type Date Requested Status
Sergio Schvezov 2015-09-26 Approve on 2015-10-01
Review via email: mp+272505@code.launchpad.net

Commit message

Patch webdm to compile again. Needs copious testing still.

To post a comment you must log in.
review: Approve
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (3.6 KiB)

The attempt to merge lp:~chipaca/webdm/build-again-plz into lp:webdm failed. Below is the output from the failed tests.

Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/blakesmith/ar failed; trying to fetch newer version
update github.com/cheggaaa/pb failed; trying to fetch newer version
github.com/blakesmith/ar now at c9a977dd0cc1392b023382c7bfa5a22af8d3b730
update github.com/gorilla/context failed; trying to fetch newer version
github.com/cheggaaa/pb now at e8c7cc515bfde3e267957a3b110080ceed51354e
update github.com/mvo5/uboot-go failed; trying to fetch newer version
github.com/gorilla/context now at 50c25fb3b2b3b3cc724e9b6ac75fb44b3bccd0da
update gopkg.in/check.v1 failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 69978a3e4b05cca9d7cfee489b3453dfed45e72c
update gopkg.in/yaml.v2 failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5bcc6bd5a76287eb75ea96c673
update launchpad.net/snappy failed; trying to fetch newer version
gopkg.in/yaml.v2 now at 49c95bdc21843256fb6c4e0d370a05f24a0bf213
update github.com/davecheney/gmx failed; trying to fetch newer version
launchpad.net/snappy now at snappy_tarmac-20150925153317-7acittvlm7idwcwl
update github.com/davecheney/mdns failed; trying to fetch newer version
github.com/davecheney/gmx now at d765420e7fbaccecb2a38cf2a02701fe3e0888a3
update github.com/gorilla/mux failed; trying to fetch newer version
github.com/davecheney/mdns now at de174d86a3d3e87bfad9cb66cedd0433380b67b0
update github.com/gosexy/gettext failed; trying to fetch newer version
github.com/gorilla/mux now at e444e69cbd2e2e3e0749a2f3c717cec491552bbf
update github.com/miekg/dns failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/miekg/dns now at 5a357a6fc5e85268b929350aa6423e2d56dcc4ff
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
Building
Running tests from /tmp/tmp.paUfjw4bQS/src/launchpad.net/webdm
=== RUN Test
OK: 4 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 60.0% of statements
ok launchpad.net/webdm/avahi 0.006s coverage: 60.0% of statements
? launchpad.net/webdm/cmd/snappyd [no test files]
? launchpad.net/webdm/oem [no test files]
FAIL launchpad.net/webdm/snappy [build failed]
? launchpad.net/webdm/webprogress [no test files]

# we always run in a fresh dir in tarmac
export GOPATH=$(mktemp -d)
trap 'rm -rf "$GOPATH"' EXIT

# this is a hack, but not sure tarmac is golang friendly
mkdir -p $GOPATH/src/launchpad.net/webdm
cp -a . $GOPATH/src/launchpad.net/webdm/
cd $GOPATH/src/launchpad.net/webdm

./run-checks
github.com/davecheney/gmx
github.com/miekg/dns
gopkg.in/yaml.v2
launchpad.net/snappy/pkg
github.com/mvo5/goconfigparser
github.com/blakesmith/ar
launchpad.net/snappy/logger
launchpad.net/snappy/helpers
launchpad.net/snappy/clickdeb
launchpad.net/snappy/coreconfig
github.com/davecheney/mdns
github.com/gosexy/gettext
launchpad.net/webdm/avahi
launchpad.net/snappy/oauth
github.com/mvo5/uboot-go/uenv
launchpad.net/snappy/partition
launchpad.net/snappy/...

Read more...

Unmerged revisions

161. By John Lenton on 2015-09-25

update package version

160. By John Lenton on 2015-09-25

build again, ok? ta

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'dependencies.tsv'
--- dependencies.tsv 2015-05-07 18:53:42 +0000
+++ dependencies.tsv 2015-09-26 00:18:02 +0000
@@ -4,9 +4,10 @@
4github.com/davecheney/mdns git de174d86a3d3e87bfad9cb66cedd0433380b67b0 2014-09-13T23:56:41Z4github.com/davecheney/mdns git de174d86a3d3e87bfad9cb66cedd0433380b67b0 2014-09-13T23:56:41Z
5github.com/gorilla/context git 50c25fb3b2b3b3cc724e9b6ac75fb44b3bccd0da 2014-11-26T16:34:05Z5github.com/gorilla/context git 50c25fb3b2b3b3cc724e9b6ac75fb44b3bccd0da 2014-11-26T16:34:05Z
6github.com/gorilla/mux git e444e69cbd2e2e3e0749a2f3c717cec491552bbf 2014-09-26T15:38:14Z6github.com/gorilla/mux git e444e69cbd2e2e3e0749a2f3c717cec491552bbf 2014-09-26T15:38:14Z
7github.com/juju/loggo git 4c7cbce140ca070eeb59a28f4bf9507e511711f9 2015-02-26T05:51:10Z7github.com/gosexy/gettext git 98b7b91596d20b96909e6b60d57411547dd9959c 2013-02-21T11:21:43Z
8github.com/miekg/dns git 5a357a6fc5e85268b929350aa6423e2d56dcc4ff 2015-04-18T05:52:30Z8github.com/miekg/dns git 5a357a6fc5e85268b929350aa6423e2d56dcc4ff 2015-04-18T05:52:30Z
9github.com/mvo5/goconfigparser git 26426272dda20cc76aa1fa44286dc743d2972fe8 2015-02-12T09:37:50Z9github.com/mvo5/goconfigparser git 26426272dda20cc76aa1fa44286dc743d2972fe8 2015-02-12T09:37:50Z
10github.com/mvo5/uboot-go git 69978a3e4b05cca9d7cfee489b3453dfed45e72c 2015-07-23T08:17:10Z
10gopkg.in/check.v1 git 64131543e7896d5bcc6bd5a76287eb75ea96c673 2014-10-24T13:38:53Z11gopkg.in/check.v1 git 64131543e7896d5bcc6bd5a76287eb75ea96c673 2014-10-24T13:38:53Z
11gopkg.in/yaml.v2 git 49c95bdc21843256fb6c4e0d370a05f24a0bf213 2015-02-24T22:57:58Z12gopkg.in/yaml.v2 git 49c95bdc21843256fb6c4e0d370a05f24a0bf213 2015-02-24T22:57:58Z
12launchpad.net/snappy bzr snappy_tarmac-20150507103214-pgd90adryua6v6wi 44413launchpad.net/snappy bzr snappy_tarmac-20150925153317-7acittvlm7idwcwl 718
1314
=== modified file 'oem/oem.go'
--- oem/oem.go 2015-05-08 19:21:46 +0000
+++ oem/oem.go 2015-09-26 00:18:02 +0000
@@ -22,12 +22,13 @@
22 "io/ioutil"22 "io/ioutil"
23 "path/filepath"23 "path/filepath"
2424
25 "launchpad.net/snappy/pkg"
25 "launchpad.net/snappy/snappy"26 "launchpad.net/snappy/snappy"
2627
27 "gopkg.in/yaml.v2"28 "gopkg.in/yaml.v2"
28)29)
2930
30// Snap holds the package.yaml for a snappy.SnapTypeOem package.31// Snap holds the package.yaml for a pkg.TypeOem package.
31type Snap struct {32type Snap struct {
32 Name string `yaml:"name" json:"name"`33 Name string `yaml:"name" json:"name"`
33 Vendor string `yaml:"vendor" json:"vendor"`34 Vendor string `yaml:"vendor" json:"vendor"`
@@ -46,7 +47,7 @@
46// ErrNotFound indicates that there is no oem package.47// ErrNotFound indicates that there is no oem package.
47var ErrNotFound = errors.New("no oem package installed")48var ErrNotFound = errors.New("no oem package installed")
4849
49// ErrTooMany indicates that there are too many active snappy.SnapTypeOem packages, which50// ErrTooMany indicates that there are too many active pkg.TypeOem packages, which
50// should never happen on a snappy managed system.51// should never happen on a snappy managed system.
51var ErrTooMany = errors.New("too many oem packages found")52var ErrTooMany = errors.New("too many oem packages found")
5253
@@ -56,7 +57,7 @@
5657
57// Oem returns an oem package58// Oem returns an oem package
58func Oem() (*Snap, error) {59func Oem() (*Snap, error) {
59 oem, err := snappy.ActiveSnapsByType(snappy.SnapTypeOem)60 oem, err := snappy.ActiveSnapsByType(pkg.TypeOem)
60 if err != nil {61 if err != nil {
61 return nil, err62 return nil, err
62 } else if len(oem) > 1 {63 } else if len(oem) > 1 {
6364
=== modified file 'pkg/meta/package.yaml'
--- pkg/meta/package.yaml 2015-06-10 14:41:19 +0000
+++ pkg/meta/package.yaml 2015-09-26 00:18:02 +0000
@@ -3,7 +3,7 @@
3icon: meta/webdm-icon.png3icon: meta/webdm-icon.png
4source: lp:webdm4source: lp:webdm
5type: framework5type: framework
6version: 0.96version: 0.9.1
7architecture: UNKNOWN_ARCH7architecture: UNKNOWN_ARCH
8services:8services:
9 - name: snappyd9 - name: snappyd
1010
=== modified file 'snappy/converge.go'
--- snappy/converge.go 2015-05-08 15:22:21 +0000
+++ snappy/converge.go 2015-09-26 00:18:02 +0000
@@ -25,6 +25,7 @@
2525
26 "log"26 "log"
2727
28 "launchpad.net/snappy/pkg"
28 "launchpad.net/snappy/snappy"29 "launchpad.net/snappy/snappy"
29 "launchpad.net/webdm/webprogress"30 "launchpad.net/webdm/webprogress"
30)31)
@@ -43,7 +44,7 @@
43 Progress float64 `json:"progress,omitempty"`44 Progress float64 `json:"progress,omitempty"`
44 InstalledSize int64 `json:"installed_size,omitempty"`45 InstalledSize int64 `json:"installed_size,omitempty"`
45 DownloadSize int64 `json:"download_size,omitempty"`46 DownloadSize int64 `json:"download_size,omitempty"`
46 Type snappy.SnapType `json:"type,omitempty"`47 Type pkg.Type `json:"type,omitempty"`
47 UIPort uint64 `json:"ui_port,omitempty"`48 UIPort uint64 `json:"ui_port,omitempty"`
48 UIUri string `json:"ui_uri,omitempty"`49 UIUri string `json:"ui_uri,omitempty"`
49}50}
@@ -63,10 +64,10 @@
63var activeSnapByName = snappy.ActiveSnapByName64var activeSnapByName = snappy.ActiveSnapByName
6465
65func (h *Handler) packagePayload(resource string) (snapPkg, error) {66func (h *Handler) packagePayload(resource string) (snapPkg, error) {
66 var pkgName, namespace string67 var pkgName, origin string
67 if s := strings.Split(resource, "."); len(s) == 2 {68 if s := strings.Split(resource, "."); len(s) == 2 {
68 pkgName = s[0]69 pkgName = s[0]
69 namespace = s[1]70 origin = s[1]
70 } else {71 } else {
71 pkgName = resource72 pkgName = resource
72 }73 }
@@ -74,13 +75,13 @@
74 snapQ := activeSnapByName(pkgName)75 snapQ := activeSnapByName(pkgName)
75 if snapQ != nil {76 if snapQ != nil {
76 // the second check is for locally installed snaps that lose their origin.77 // the second check is for locally installed snaps that lose their origin.
77 if snapQ.Namespace() == namespace || snapQ.Type() != snappy.SnapTypeApp {78 if snapQ.Origin() == origin || snapQ.Type() != pkg.TypeApp {
78 return h.snapQueryToPayload(snapQ), nil79 return h.snapQueryToPayload(snapQ), nil
79 }80 }
80 }81 }
8182
82 mStore := snappy.NewMetaStoreRepository()83 mStore := snappy.NewMetaStoreRepository()
83 found, err := mStore.Details(resource)84 found, err := mStore.Details(pkgName, origin)
84 if err == nil && len(found) != 0 {85 if err == nil && len(found) != 0 {
85 return h.snapQueryToPayload(found[0]), nil86 return h.snapQueryToPayload(found[0]), nil
86 }87 }
@@ -225,33 +226,24 @@
225 return snapPkgs226 return snapPkgs
226}227}
227228
228func isNamespaceless(snap snappy.Part) bool {
229 return snap.Type() == snappy.SnapTypeOem || snap.Type() == snappy.SnapTypeFramework
230}
231
232func hasPortInformation(snap snappy.Part) bool {229func hasPortInformation(snap snappy.Part) bool {
233 return snap.Type() == snappy.SnapTypeApp || snap.Type() == snappy.SnapTypeFramework230 return snap.Type() == pkg.TypeApp || snap.Type() == pkg.TypeFramework
234}231}
235232
236func (h *Handler) snapQueryToPayload(snapQ snappy.Part) snapPkg {233func (h *Handler) snapQueryToPayload(snapQ snappy.Part) snapPkg {
237 snap := snapPkg{234 snap := snapPkg{
238 Name: snapQ.Name(),235 Name: snapQ.Name(),
239 Origin: snapQ.Namespace(),236 Origin: snapQ.Origin(),
240 Version: snapQ.Version(),237 Version: snapQ.Version(),
241 Vendor: snapQ.Vendor(),238 Vendor: snapQ.Vendor(),
242 Description: snapQ.Description(),239 Description: snapQ.Description(),
243 Type: snapQ.Type(),240 Type: snapQ.Type(),
244 }241 ID: snappy.QualifiedName(snapQ),
245
246 if isNamespaceless(snapQ) {
247 snap.ID = snapQ.Name()
248 } else {
249 snap.ID = snapQ.Name() + "." + snapQ.Namespace()
250 }242 }
251243
252 if hasPortInformation(snapQ) {244 if hasPortInformation(snapQ) {
253 if snapInstalled, ok := snapQ.(snappy.Services); ok {245 if snapInstalled, ok := snapQ.(snappy.ServiceYamler); ok {
254 port, uri := uiAccess(snapInstalled.Services())246 port, uri := uiAccess(snapInstalled.ServiceYamls())
255 snap.UIPort = port247 snap.UIPort = port
256 snap.UIUri = uri248 snap.UIUri = uri
257 }249 }
@@ -293,7 +285,7 @@
293 return snap285 return snap
294}286}
295287
296func uiAccess(services []snappy.Service) (port uint64, uri string) {288func uiAccess(services []snappy.ServiceYaml) (port uint64, uri string) {
297 for i := range services {289 for i := range services {
298 if services[i].Ports == nil {290 if services[i].Ports == nil {
299 continue291 continue

Subscribers

People subscribed via source and target branches

to all changes: