Bug 243480 - shells/fish should depend on textproc/groff
Summary: shells/fish should depend on textproc/groff
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alan Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-21 08:15 UTC by Igor Galić
Modified: 2020-02-23 21:13 UTC (History)
3 users (show)

See Also:


Attachments
Depend on groff whenever MANPAGES is enabled (371 bytes, patch)
2020-02-11 17:01 UTC, Alan Somers
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Galić 2020-01-21 08:15:32 UTC
When using a builtin in fish wrongly, fish tries to helpfully render that builtin's help page. Unfortunately, by default groff isn't installed, and fish, despite using nroff doesn't depend on it, so the result is:

~ $ set -e /usr/local/llvm80/bin fish_user_paths
fish: Unknown command nroff
/usr/local/share/fish/functions/__fish_print_help.fish (line 1):
gunzip -c "$__fish_data_dir/man/man1/$item.1.gz" 2>/dev/null | nroff -c -man $mfish -t $rLL 2>/dev/null
                                                               ^
in command substitution
        called on line 28 of file /usr/local/share/fish/functions/__fish_print_help.fish

in function '__fish_print_help'
        called on standard input
        with parameter list 'set'

in command substitution
        called on standard input

set --erase: Expected 1 args, got 2


after installing groff, the same invocation yields:

~ $ set -e /usr/local/llvm80/bin fish_user_paths
set --erase: Expected 1 args, got 2

       set

   Synopsis
       set [SCOPE_OPTIONS]
       set [OPTIONS] VARIABLE_NAME VALUES...
       set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
       set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES...
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
       set ( -S | --show ) [SCOPE_OPTIONS] [VARIABLE_NAME]...

set: Type 'help set' for related documentation
Comment 1 Koichiro Iwao freebsd_committer 2020-01-29 02:42:08 UTC
Assign to maintainer. I guess auto assignment doesn't work properly if more than one ports are listed on title.
Comment 2 Alan Somers freebsd_committer 2020-02-11 17:01:17 UTC
Created attachment 211567 [details]
Depend on groff whenever MANPAGES is enabled

Please try the attached patch.
Comment 3 commit-hook freebsd_committer 2020-02-23 21:13:00 UTC
A commit references this bug:

Author: asomers
Date: Sun Feb 23 21:12:26 UTC 2020
New revision: 526945
URL: https://svnweb.freebsd.org/changeset/ports/526945

Log:
  shells/fish: needs groff at runtime

  add groff as a runtime MANPAGES_USES.  fish uses it to format partial man
  pages in response to syntax errors.

  PR:		243480
  Reported by:	Igor Gali <i.galic@brainsware.org>

Changes:
  head/shells/fish/Makefile