FS#47388 - [man-pages] 4.03-1 awk man page incorrectly displays '~' operator

Attached to Project: Arch Linux
Opened by Roma Kovalev (bsdbeard) - Tuesday, 15 December 2015, 14:44 GMT
Last edited by Andreas Radke (AndyRTR) - Thursday, 28 July 2016, 06:33 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Andreas Radke (AndyRTR)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
The awk (nawk) man page in core/man-pages displays " " where ~ should be displayed, this does not occur in the awk man page of other distributions and in the POSIX manual (http://pubs.opengroup.org/onlinepubs/9699919799/). Additionally, there are some spaces after ! which should not occur as they will cause errors. Example from archlinux man page:

$2 " " /xyz/ && $4 ! " " /xyz/

the same example in the above link:

$2 ˜ /xyz/ && $4 !˜ /xyz/

Steps to reproduce:
man awk
/\$.*" "
This will find occurences like:
$2 " " /xyz/ && $4 ! " " /xyz/

Which will produce an error when passed to awk, i.e. awk '$2 " " /xyz/ && $4 ! " " /xyz/' returns unexpected newline or end of string.

After replacing " " with ~ and ! " " with !~ (no space after !, important), the program works as expected.
This task depends upon

Closed by  Andreas Radke (AndyRTR)
Thursday, 28 July 2016, 06:33 GMT
Reason for closing:  Upstream
Comment by Andreas Radke (AndyRTR) - Thursday, 31 December 2015, 11:40 GMT
What man page is broken? I guess the one from man-pages package.

[andyrtr@workstation64 ~]$ pacman -Qo /usr/share/man/man1/awk.1p.gz /usr/share/man/man1/gawk.1.gz
/usr/share/man/man1/awk.1p.gz ist in man-pages 4.03-1 enthalten
/usr/share/man/man1/gawk.1.gz ist in gawk 4.1.3-1 enthalten

You should report back to https://www.kernel.org/doc/man-pages/contributing.html. Since we ship unchanged upstream man-pages from the man-pages project this should be an upstream bug.
Comment by Andreas Radke (AndyRTR) - Thursday, 31 December 2015, 11:41 GMT
Just make sure it's also broken in the man-pages git repo and not a bug in man-db displaying it not properly.
Comment by Roma Kovalev (bsdbeard) - Monday, 11 January 2016, 12:46 GMT
The bug does indeed seem to be present upstream, specifically it's present in man-pages-posix-2013-a.tar.xz, but not in man-pages-posix-2003-a.tar.xz (from https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/), I had not noticed this in other distributions while testing since they seemed to use man-pages-posix-2003-a.tar.xz, on archlinux it's the file /usr/share/man/man1/awk.1p.gz, it's not a display issue, as you can see the problem on line 3015 of awk.1p when viewing with a text editor. I will report the bug upstream.
Comment by Andreas Radke (AndyRTR) - Friday, 01 April 2016, 16:58 GMT
There's no magic that upstream will fix something they don't know about!
Comment by Andreas Radke (AndyRTR) - Thursday, 23 June 2016, 19:55 GMT

Loading...