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
1=== modified file 'dependencies.tsv'
2--- dependencies.tsv 2015-05-07 18:53:42 +0000
3+++ dependencies.tsv 2015-09-26 00:18:02 +0000
4@@ -4,9 +4,10 @@
5 github.com/davecheney/mdns git de174d86a3d3e87bfad9cb66cedd0433380b67b0 2014-09-13T23:56:41Z
6 github.com/gorilla/context git 50c25fb3b2b3b3cc724e9b6ac75fb44b3bccd0da 2014-11-26T16:34:05Z
7 github.com/gorilla/mux git e444e69cbd2e2e3e0749a2f3c717cec491552bbf 2014-09-26T15:38:14Z
8-github.com/juju/loggo git 4c7cbce140ca070eeb59a28f4bf9507e511711f9 2015-02-26T05:51:10Z
9+github.com/gosexy/gettext git 98b7b91596d20b96909e6b60d57411547dd9959c 2013-02-21T11:21:43Z
10 github.com/miekg/dns git 5a357a6fc5e85268b929350aa6423e2d56dcc4ff 2015-04-18T05:52:30Z
11 github.com/mvo5/goconfigparser git 26426272dda20cc76aa1fa44286dc743d2972fe8 2015-02-12T09:37:50Z
12+github.com/mvo5/uboot-go git 69978a3e4b05cca9d7cfee489b3453dfed45e72c 2015-07-23T08:17:10Z
13 gopkg.in/check.v1 git 64131543e7896d5bcc6bd5a76287eb75ea96c673 2014-10-24T13:38:53Z
14 gopkg.in/yaml.v2 git 49c95bdc21843256fb6c4e0d370a05f24a0bf213 2015-02-24T22:57:58Z
15-launchpad.net/snappy bzr snappy_tarmac-20150507103214-pgd90adryua6v6wi 444
16+launchpad.net/snappy bzr snappy_tarmac-20150925153317-7acittvlm7idwcwl 718
17
18=== modified file 'oem/oem.go'
19--- oem/oem.go 2015-05-08 19:21:46 +0000
20+++ oem/oem.go 2015-09-26 00:18:02 +0000
21@@ -22,12 +22,13 @@
22 "io/ioutil"
23 "path/filepath"
24
25+ "launchpad.net/snappy/pkg"
26 "launchpad.net/snappy/snappy"
27
28 "gopkg.in/yaml.v2"
29 )
30
31-// Snap holds the package.yaml for a snappy.SnapTypeOem package.
32+// Snap holds the package.yaml for a pkg.TypeOem package.
33 type Snap struct {
34 Name string `yaml:"name" json:"name"`
35 Vendor string `yaml:"vendor" json:"vendor"`
36@@ -46,7 +47,7 @@
37 // ErrNotFound indicates that there is no oem package.
38 var ErrNotFound = errors.New("no oem package installed")
39
40-// ErrTooMany indicates that there are too many active snappy.SnapTypeOem packages, which
41+// ErrTooMany indicates that there are too many active pkg.TypeOem packages, which
42 // should never happen on a snappy managed system.
43 var ErrTooMany = errors.New("too many oem packages found")
44
45@@ -56,7 +57,7 @@
46
47 // Oem returns an oem package
48 func Oem() (*Snap, error) {
49- oem, err := snappy.ActiveSnapsByType(snappy.SnapTypeOem)
50+ oem, err := snappy.ActiveSnapsByType(pkg.TypeOem)
51 if err != nil {
52 return nil, err
53 } else if len(oem) > 1 {
54
55=== modified file 'pkg/meta/package.yaml'
56--- pkg/meta/package.yaml 2015-06-10 14:41:19 +0000
57+++ pkg/meta/package.yaml 2015-09-26 00:18:02 +0000
58@@ -3,7 +3,7 @@
59 icon: meta/webdm-icon.png
60 source: lp:webdm
61 type: framework
62-version: 0.9
63+version: 0.9.1
64 architecture: UNKNOWN_ARCH
65 services:
66 - name: snappyd
67
68=== modified file 'snappy/converge.go'
69--- snappy/converge.go 2015-05-08 15:22:21 +0000
70+++ snappy/converge.go 2015-09-26 00:18:02 +0000
71@@ -25,6 +25,7 @@
72
73 "log"
74
75+ "launchpad.net/snappy/pkg"
76 "launchpad.net/snappy/snappy"
77 "launchpad.net/webdm/webprogress"
78 )
79@@ -43,7 +44,7 @@
80 Progress float64 `json:"progress,omitempty"`
81 InstalledSize int64 `json:"installed_size,omitempty"`
82 DownloadSize int64 `json:"download_size,omitempty"`
83- Type snappy.SnapType `json:"type,omitempty"`
84+ Type pkg.Type `json:"type,omitempty"`
85 UIPort uint64 `json:"ui_port,omitempty"`
86 UIUri string `json:"ui_uri,omitempty"`
87 }
88@@ -63,10 +64,10 @@
89 var activeSnapByName = snappy.ActiveSnapByName
90
91 func (h *Handler) packagePayload(resource string) (snapPkg, error) {
92- var pkgName, namespace string
93+ var pkgName, origin string
94 if s := strings.Split(resource, "."); len(s) == 2 {
95 pkgName = s[0]
96- namespace = s[1]
97+ origin = s[1]
98 } else {
99 pkgName = resource
100 }
101@@ -74,13 +75,13 @@
102 snapQ := activeSnapByName(pkgName)
103 if snapQ != nil {
104 // the second check is for locally installed snaps that lose their origin.
105- if snapQ.Namespace() == namespace || snapQ.Type() != snappy.SnapTypeApp {
106+ if snapQ.Origin() == origin || snapQ.Type() != pkg.TypeApp {
107 return h.snapQueryToPayload(snapQ), nil
108 }
109 }
110
111 mStore := snappy.NewMetaStoreRepository()
112- found, err := mStore.Details(resource)
113+ found, err := mStore.Details(pkgName, origin)
114 if err == nil && len(found) != 0 {
115 return h.snapQueryToPayload(found[0]), nil
116 }
117@@ -225,33 +226,24 @@
118 return snapPkgs
119 }
120
121-func isNamespaceless(snap snappy.Part) bool {
122- return snap.Type() == snappy.SnapTypeOem || snap.Type() == snappy.SnapTypeFramework
123-}
124-
125 func hasPortInformation(snap snappy.Part) bool {
126- return snap.Type() == snappy.SnapTypeApp || snap.Type() == snappy.SnapTypeFramework
127+ return snap.Type() == pkg.TypeApp || snap.Type() == pkg.TypeFramework
128 }
129
130 func (h *Handler) snapQueryToPayload(snapQ snappy.Part) snapPkg {
131 snap := snapPkg{
132 Name: snapQ.Name(),
133- Origin: snapQ.Namespace(),
134+ Origin: snapQ.Origin(),
135 Version: snapQ.Version(),
136 Vendor: snapQ.Vendor(),
137 Description: snapQ.Description(),
138 Type: snapQ.Type(),
139- }
140-
141- if isNamespaceless(snapQ) {
142- snap.ID = snapQ.Name()
143- } else {
144- snap.ID = snapQ.Name() + "." + snapQ.Namespace()
145+ ID: snappy.QualifiedName(snapQ),
146 }
147
148 if hasPortInformation(snapQ) {
149- if snapInstalled, ok := snapQ.(snappy.Services); ok {
150- port, uri := uiAccess(snapInstalled.Services())
151+ if snapInstalled, ok := snapQ.(snappy.ServiceYamler); ok {
152+ port, uri := uiAccess(snapInstalled.ServiceYamls())
153 snap.UIPort = port
154 snap.UIUri = uri
155 }
156@@ -293,7 +285,7 @@
157 return snap
158 }
159
160-func uiAccess(services []snappy.Service) (port uint64, uri string) {
161+func uiAccess(services []snappy.ServiceYaml) (port uint64, uri string) {
162 for i := range services {
163 if services[i].Ports == nil {
164 continue

Subscribers

People subscribed via source and target branches

to all changes: