Merge lp:~chipaca/snappy/snappy-man into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by John Lenton
Status: Merged
Approved by: John Lenton
Approved revision: 620
Merged at revision: 629
Proposed branch: lp:~chipaca/snappy/snappy-man
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Prerequisite: lp:~chipaca/snappy/dynamicExclusion
Diff against target: 92 lines (+52/-2)
4 files modified
cmd/snappy/cmd_man.go (+42/-0)
debian/rules (+5/-1)
debian/ubuntu-snappy-cli.manpages (+1/-0)
po/snappy.pot (+4/-1)
To merge this branch: bzr merge lp:~chipaca/snappy/snappy-man
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Snappy Tarmac (community) continuous-integration Approve
Review via email: mp+266203@code.launchpad.net

Commit message

zeroth iteration of snappy man.

Description of the change

Zyga correctly pointed out we should have a (ideally dynamically created) manpage. Here is the zeroth iteration of it. So much work to do still! But this is a start.

To read: snappy man | man -l -

To post a comment you must log in.
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

Can you add this to debian/rules as well?

Note: I tried adding to debian rules for u-d-f in the past and failed miserably.

review: Needs Information
Revision history for this message
John Lenton (chipaca) wrote :

I could, but we don't ship "man" in core ... still thinking about that.

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

On Wed, Jul 29, 2015 at 01:25:11PM -0000, John Lenton wrote:
> I could, but we don't ship "man" in core ... still thinking about that.

But we do on the desktops running snappy build ;-)

Revision history for this message
John Lenton (chipaca) wrote :

That should do it.

Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :

PASSED: Continuous integration, rev:619
$BUILD_URL
Executed test runs:

Click here to trigger a rebuild:
$BUILD_URL/rebuild

review: Approve (continuous-integration)
Revision history for this message
Sergio Schvezov (sergiusens) :
review: Approve
Revision history for this message
Snappy Tarmac (snappydevtarmac) wrote :
Download full text (7.0 KiB)

The attempt to merge lp:~chipaca/snappy/snappy-man into lp:snappy failed. Below is the output from the failed tests.

Checking docs
Checking formatting
Installing godeps
Install golint
Obtaining dependencies
update github.com/gosexy/gettext failed; trying to fetch newer version
update github.com/mvo5/goconfigparser failed; trying to fetch newer version
github.com/gosexy/gettext now at 98b7b91596d20b96909e6b60d57411547dd9959c
update github.com/blakesmith/ar failed; trying to fetch newer version
github.com/mvo5/goconfigparser now at 26426272dda20cc76aa1fa44286dc743d2972fe8
update github.com/cheggaaa/pb failed; trying to fetch newer version
github.com/blakesmith/ar now at c9a977dd0cc1392b023382c7bfa5a22af8d3b730
update github.com/jessevdk/go-flags 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/jessevdk/go-flags now at 15347ef417a300349807983f15af9e65cd2e1b3a
update golang.org/x/crypto failed; trying to fetch newer version
github.com/mvo5/uboot-go now at 361f6ebcbb54f389d15dc9faefa000e996ba3e37
update gopkg.in/check.v1 failed; trying to fetch newer version
golang.org/x/crypto now at 60052bd85f2d91293457e8811b0cf26b773de469
update gopkg.in/yaml.v2 failed; trying to fetch newer version
gopkg.in/check.v1 now at 64131543e7896d5bcc6bd5a76287eb75ea96c673
gopkg.in/yaml.v2 now at 49c95bdc21843256fb6c4e0d370a05f24a0bf213
Building
Running tests from /tmp/tmp.F3pMmvW8Iq/src/launchpad.net/snappy
=== RUN Test
OK: 16 passed
--- PASS: Test (0.31 seconds)
PASS
coverage: 74.8% of statements
ok launchpad.net/snappy/clickdeb 0.319s coverage: 74.8% of statements
=== RUN Test
2015/08/14 12:31:50.771735 common.go:40: PANIC can not set option description for "package name"
OK: 9 passed
--- PASS: Test (0.01 seconds)
PASS
coverage: 19.1% of statements
ok launchpad.net/snappy/cmd/snappy 0.019s coverage: 19.1% of statements
=== RUN Test
OK: 24 passed
--- PASS: Test (0.05 seconds)
PASS
coverage: 100.0% of statements
ok launchpad.net/snappy/coreconfig 0.057s coverage: 100.0% of statements
=== RUN Test
OK: 55 passed
--- PASS: Test (0.31 seconds)
PASS
coverage: 79.9% of statements
ok launchpad.net/snappy/helpers 0.316s coverage: 79.9% of statements
=== RUN Test
OK: 0 passed, 2 skipped
--- PASS: Test (0.01 seconds)
PASS
coverage: 33.3% of statements
ok launchpad.net/snappy/i18n 0.018s coverage: 33.3% of statements
=== RUN Test
OK: 11 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 93.4% of statements
ok launchpad.net/snappy/i18n/xgettext-go 0.007s coverage: 93.4% of statements
=== RUN Test
OK: 6 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 93.5% of statements
ok launchpad.net/snappy/logger 0.006s coverage: 93.5% of statements
=== RUN Test
OK: 4 passed
--- PASS: Test (0.00 seconds)
PASS
coverage: 100.0% of statements
ok launchpad.net/snappy/oauth 0.005s coverage: 100.0% of statements
=== RUN Test
OK: 39 passed
--- PASS: Test (0.45 seconds)
PASS
coverage: 79.4% of statements
ok launchpad.net/snappy/partition 0.454s coverage: 79.4% of statements
=== RUN Test
OK: 3 passed
--- PASS: Test (0.00 seconds)
PASS
covera...

Read more...

lp:~chipaca/snappy/snappy-man updated
620. By John Lenton

run update-pot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'cmd/snappy/cmd_man.go'
2--- cmd/snappy/cmd_man.go 1970-01-01 00:00:00 +0000
3+++ cmd/snappy/cmd_man.go 2015-08-14 12:37:01 +0000
4@@ -0,0 +1,42 @@
5+// -*- Mode: Go; indent-tabs-mode: t -*-
6+
7+/*
8+ * Copyright (C) 2014-2015 Canonical Ltd
9+ *
10+ * This program is free software: you can redistribute it and/or modify
11+ * it under the terms of the GNU General Public License version 3 as
12+ * published by the Free Software Foundation.
13+ *
14+ * This program is distributed in the hope that it will be useful,
15+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+ * GNU General Public License for more details.
18+ *
19+ * You should have received a copy of the GNU General Public License
20+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21+ *
22+ */
23+
24+package main
25+
26+import (
27+ "os"
28+
29+ "launchpad.net/snappy/i18n"
30+ "launchpad.net/snappy/logger"
31+)
32+
33+type man struct{}
34+
35+func init() {
36+ _, err := parser.AddCommand("man", i18n.G("produces manpage"), i18n.G("produces manpage"), &man{})
37+ if err != nil {
38+ logger.Panicf("Unable to man: %v", err)
39+ }
40+}
41+
42+func (*man) Execute([]string) error {
43+ parser.WriteManPage(os.Stdout)
44+
45+ return nil
46+}
47
48=== modified file 'debian/rules'
49--- debian/rules 2015-07-29 00:58:34 +0000
50+++ debian/rules 2015-08-14 12:37:01 +0000
51@@ -64,7 +64,11 @@
52 go generate ./i18n
53 dh_auto_build
54
55-override_dh_auto_install:
56+override_dh_auto_install: snappy.8
57 dh_auto_install -O--buildsystem=golang
58 # Making the packages private
59 rm -rf ${CURDIR}/debian/ubuntu-snappy/usr/share/gocode
60+
61+snappy.8:
62+ ./debian/ubuntu-snappy/usr/bin/snappy man > $@
63+
64
65=== added file 'debian/ubuntu-snappy-cli.manpages'
66--- debian/ubuntu-snappy-cli.manpages 1970-01-01 00:00:00 +0000
67+++ debian/ubuntu-snappy-cli.manpages 2015-08-14 12:37:01 +0000
68@@ -0,0 +1,1 @@
69+snappy.8
70
71=== modified file 'po/snappy.pot'
72--- po/snappy.pot 2015-07-24 15:16:48 +0000
73+++ po/snappy.pot 2015-08-14 12:37:01 +0000
74@@ -7,7 +7,7 @@
75 msgid ""
76 msgstr "Project-Id-Version: snappy\n"
77 "Report-Msgid-Bugs-To: snappy-devel@lists.ubuntu.com\n"
78- "POT-Creation-Date: 2015-07-24 16:16+0100\n"
79+ "POT-Creation-Date: 2015-08-14 13:36+0100\n"
80 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
81 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
82 "Language-Team: LANGUAGE <LL@li.org>\n"
83@@ -325,6 +325,9 @@
84 msgid "package name is required"
85 msgstr ""
86
87+msgid "produces manpage"
88+msgstr ""
89+
90 #. TRANSLATORS: the %s release string
91 #, c-format
92 msgid "release: %s\n"

Subscribers

People subscribed via source and target branches