Merge lp:~chipaca/snapweb/build-again-plz into lp:~snappy-dev/snapweb/trunk
- build-again-plz
- Merge into trunk
Proposed by John Lenton
| 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 |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Sergio Schvezov | Approve | ||
| Review via email: | |||
Commit message
Patch webdm to compile again. Needs copious testing still.
Description of the change
To post a comment you must log in.
Revision history for this message
| Snappy Tarmac (snappydevtarmac) wrote : | # |
Unmerged revisions
- 161. By John Lenton
-
update package version
- 160. By John Lenton
-
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 |

The attempt to merge lp:~chipaca/webdm/build-again-plz into lp:webdm failed. Below is the output from the failed tests.
Checking formatting com/blakesmith/ ar failed; trying to fetch newer version com/cheggaaa/ pb failed; trying to fetch newer version com/blakesmith/ ar now at c9a977dd0cc1392 b023382c7bfa5a2 2af8d3b730 com/gorilla/ context failed; trying to fetch newer version com/cheggaaa/ pb now at e8c7cc515bfde3e 267957a3b110080 ceed51354e com/mvo5/ uboot-go failed; trying to fetch newer version com/gorilla/ context now at 50c25fb3b2b3b3c c724e9b6ac75fb4 4b3bccd0da com/mvo5/ uboot-go now at 69978a3e4b05cca 9d7cfee489b3453 dfed45e72c bcc6bd5a76287eb 75ea96c673 net/snappy failed; trying to fetch newer version 6fb6c4e0d370a05 f24a0bf213 com/davecheney/ gmx failed; trying to fetch newer version net/snappy now at snappy_ tarmac- 20150925153317- 7acittvlm7idwcw l com/davecheney/ mdns failed; trying to fetch newer version com/davecheney/ gmx now at d765420e7fbacce cb2a38cf2a02701 fe3e0888a3 com/gorilla/ mux failed; trying to fetch newer version com/davecheney/ mdns now at de174d86a3d3e87 bfad9cb66cedd04 33380b67b0 com/gosexy/ gettext failed; trying to fetch newer version com/gorilla/ mux now at e444e69cbd2e2e3 e0749a2f3c717ce c491552bbf com/miekg/ dns failed; trying to fetch newer version com/gosexy/ gettext now at 98b7b91596d20b9 6909e6b60d57411 547dd9959c com/mvo5/ goconfigparser failed; trying to fetch newer version com/miekg/ dns now at 5a357a6fc5e8526 8b929350aa6423e 2d56dcc4ff com/mvo5/ goconfigparser now at 26426272dda20cc 76aa1fa44286dc7 43d2972fe8 paUfjw4bQS/ src/launchpad. net/webdm net/webdm/ avahi 0.006s coverage: 60.0% of statements net/webdm/ cmd/snappyd [no test files] net/webdm/ oem [no test files] net/webdm/ snappy [build failed] net/webdm/ webprogress [no test files]
Installing godeps
Install golint
Obtaining dependencies
update github.
update github.
github.
update github.
github.
update github.
github.
update gopkg.in/check.v1 failed; trying to fetch newer version
github.
update gopkg.in/yaml.v2 failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5
update launchpad.
gopkg.in/yaml.v2 now at 49c95bdc2184325
update github.
launchpad.
update github.
github.
update github.
github.
update github.
github.
update github.
github.
update github.
github.
github.
Building
Running tests from /tmp/tmp.
=== RUN Test
OK: 4 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 60.0% of statements
ok launchpad.
? launchpad.
? launchpad.
FAIL launchpad.
? launchpad.
# 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 src/launchpad. net/webdm src/launchpad. net/webdm/ src/launchpad. net/webdm
mkdir -p $GOPATH/
cp -a . $GOPATH/
cd $GOPATH/
./run-checks com/davecheney/ gmx com/miekg/ dns net/snappy/ pkg com/mvo5/ goconfigparser com/blakesmith/ ar net/snappy/ logger net/snappy/ helpers net/snappy/ clickdeb net/snappy/ coreconfig com/davecheney/ mdns com/gosexy/ gettext net/webdm/ avahi net/snappy/ oauth com/mvo5/ uboot-go/ uenv net/snappy/ partition net/snappy/ ...
github.
github.
gopkg.in/yaml.v2
launchpad.
github.
github.
launchpad.
launchpad.
launchpad.
launchpad.
github.
github.
launchpad.
launchpad.
github.
launchpad.
launchpad.