Fwd: petname snap bug

Jamie Strandboge jamie at canonical.com
Fri Feb 17 20:38:06 UTC 2017


On Fri, 2017-02-17 at 10:35 -0600, Dustin Kirkland wrote:
> Is there something special I need to do to have the "man" binary
> available to me?
> 
> My snap ships a manpage in /snap/petname/share/man/man1/petname.1
> 
> Perhaps too cleverly, when you run /snap/bin/petname --help, my
> program tries to "exec man petname", and that fails:
> 
> $ /snap/bin/petname -h
> /snap/petname/9/bin/petname: 49: exec: man: not found
> 
> Please advise.  Do I need to include man as a part or something?
> 
Charles gave the bug for this,

For something that should work today, I might mention that if you stage-packages 
man so that you have it in your snap, 'petname -h' could invoke
'$SNAP/path/to/man $SNAP/path/to/page'.

You could also dump the man page output and save that in your snap and have
'petname -h' 'less /snap/path/to/dumped/page'. I've used this command for that
sort of thing:

$ PAGER=cat LANG='en_US.UTF-8' MANWIDTH=80 man --warnings \
  -E UTF-8 -l ./path/to/page > ./path/to/dumped/page

-- 
Jamie Strandboge             | http://www.canonical.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170217/8720df69/attachment.sig>


More information about the Snapcraft mailing list