Extra steps needed to enable manpages in snap

Bug #1699526 reported by Christian Ehrhardt 
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
git-ubuntu
Triaged
Low
Nish Aravamudan

Bug Description

--help listed but not implemented.

$ git ubuntu -h
usage: git-ubuntu [-h]
                  build|build-source|clone|import|import-local|import-ppa|merge|queue|remote|tag
                  ...

Ubuntu git development tool

positional arguments:
  build|build-source|clone|import|import-local|import-ppa|merge|queue|remote|tag

                        build - Build a git-ubuntu-cloned tree with dpkg-buildpackage
                        build-source - Build a source package and changes file
                        clone - Clone a source package git repository to a directory
                        import - Update a launchpad git tree based upon the state of the Ubuntu and Debian archives
                        import-local - Import a DSC file locally
                        import-ppa - Update a launchpad git tree based upon the state of a PPA archive
                        merge - Given a git-ubuntu import'd tree, assist with an Ubuntu merge
                        queue - Interact with the unapproved and new queues
                        remote - Add a launchpad user's repository as a remote
                        tag - Given a git-ubuntu import'd tree, tag a commit respecting DEP14

optional arguments:
  -h, --help show this help message and exit

More information is available at https://wiki.ubuntu.com/UbuntuDevelopment/Merging/GitWorkflow.

So far so good, also no args work:

$ git ubuntu
usage: git-ubuntu [-h]
                  build|build-source|clone|import|import-local|import-ppa|merge|queue|remote|tag
                  ...

Ubuntu git development tool

positional arguments:
  build|build-source|clone|import|import-local|import-ppa|merge|queue|remote|tag

                        build - Build a git-ubuntu-cloned tree with dpkg-buildpackage
                        build-source - Build a source package and changes file
                        clone - Clone a source package git repository to a directory
                        import - Update a launchpad git tree based upon the state of the Ubuntu and Debian archives
                        import-local - Import a DSC file locally
                        import-ppa - Update a launchpad git tree based upon the state of a PPA archive
                        merge - Given a git-ubuntu import'd tree, assist with an Ubuntu merge
                        queue - Interact with the unapproved and new queues
                        remote - Add a launchpad user's repository as a remote
                        tag - Given a git-ubuntu import'd tree, tag a commit respecting DEP14

optional arguments:
  -h, --help show this help message and exit

More information is available at https://wiki.ubuntu.com/UbuntuDevelopment/Merging/GitWorkflow.

But:
$ git ubuntu --help
No manual entry for git-ubuntu
See 'man 7 undocumented' for help when manual pages are not available.

We discussed that a while ago and IIRC it is because git back maps that to a man page call which we lack in the snap version.

How about dropping the --help from the text at least to confuse less?
Or are snap man pages or other alternatives getting close to be ing realized?

Tags: snap
Revision history for this message
Nish Aravamudan (nacc) wrote :

1) The snap manpage already works, at least in my testing.

2) The --help option works with `git-ubuntu --help`.

3) The problem is that `git ubuntu` and `git-ubuntu` while seemingly the same, are not :) One is actually an exec from git, other is the command itself.

4) For your case, are you running from the git repository or the snap?

Changed in usd-importer:
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote : Re: [Bug 1699526] Re: missing git ubuntu --help

On Wed, Jun 21, 2017 at 6:42 PM, Nish Aravamudan <
<email address hidden>> wrote:

> 4) For your case, are you running from the git repository or the snap?

Snap.

I knew about the mapping back from 'git ubuntu' via exec.
What puzzeled me was that "-h" works and only "--help" doesn't.
I guess that git execs man in that case instead of 'git-ubuntu --help'

But since -h works (as then git execs not to man) I suggested to drop the
long option.
Well people are so used to --help so it might be just as bad to drop that.

Keep the bug incomplete unless one of us comes up with a better solution it
can expire.

Revision history for this message
Nish Aravamudan (nacc) wrote :

On 21.06.2017 [17:15:31 -0000], ChristianEhrhardt wrote:
> On Wed, Jun 21, 2017 at 6:42 PM, Nish Aravamudan <
> <email address hidden>> wrote:
>
> > 4) For your case, are you running from the git repository or the snap?
>
>
> Snap.

Hrm, that's concerning. The snap running in my bastion is able to run
`git ubuntu --help` fine and opens the manpage correctly. You don't
happen to *also* have git-ubuntu in your PATH via non-snap?

> I knew about the mapping back from 'git ubuntu' via exec.
> What puzzeled me was that "-h" works and only "--help" doesn't.
> I guess that git execs man in that case instead of 'git-ubuntu --help'

Yeah, -h isn't special to `git`, but `--help` is :)

> But since -h works (as then git execs not to man) I suggested to drop the
> long option.
> Well people are so used to --help so it might be just as bad to drop that.

And the other reason is that it *does* work with `git-ubuntu --help`.

> Keep the bug incomplete unless one of us comes up with a better solution it
> can expire.

I would rather we solve the snap git-ubuntu not having a manpage, as it
should :)

Revision history for this message
Nish Aravamudan (nacc) wrote : Re: missing git ubuntu --help

Fresh install of 16.04.2 desktop in a VM:

$ sudo snap install git-ubuntu --classic
$ git ubuntu --help
The program 'git' is currently not installed. You can install it by typing:
sudo apt install git
[ NB: I wonder if we can do better here, since we *do* ship a git in the snap... ]
$ sudo apt install git
...

and I immediately recalled what I had to do:

[man "git-ubuntu-man"]
        cmd = git-ubuntu.man
[man]
        viewer = git-ubuntu-man

in your ~/.gitconfig

I haven't yet done this in the snap, because there are no uninstall hooks and I don't want to change the user's system on classic without being able to undo it.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Do you have a bug to track to (one day) do this .rc setup once unblocked by the availability of uninstall hooks?
If not do you want to convert this bug into just such a bug?

Revision history for this message
Nish Aravamudan (nacc) wrote :

No, good point -- converted this bug.

summary: - missing git ubuntu --help
+ Extra steps needed to enable manpages in snap
Changed in usd-importer:
status: Incomplete → Confirmed
Revision history for this message
Steve Langasek (vorlon) wrote :

bump ;)

Revision history for this message
Nish Aravamudan (nacc) wrote :

It looks like install/remove hooks just landed a few days ago. I will see if they are actually present anywhere available to end-users yet.

Nish Aravamudan (nacc)
Changed in usd-importer:
milestone: none → 1.0
assignee: nobody → Nish Aravamudan (nacc)
status: Confirmed → Triaged
importance: Undecided → Low
Robie Basak (racb)
tags: added: snap
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.