bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in "cmp" man page: missing exit status value


From: David Booth
Subject: Re: Bug in "cmp" man page: missing exit status value
Date: Sat, 08 Oct 2011 22:14:54 -0400

Hi Micah & Bruce,

Thanks for your attention to this.

My version of cmp:
[[
$ cmp -version
cmp (GNU diffutils) 2.8.1
Copyright (C) 2002 Free Software Foundation, Inc.

This program comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of this program
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.

Written by Torbjorn Granlund and David MacKenzie.
]]

My version of the cmp man page:
[[
diffutils 2.8.1                   April 2002
CMP(1)
]]

Note that my version of the cmp man page refers the reader to the *diff*
info page:
[[
SEE ALSO
       The full documentation for cmp is maintained as a Texinfo
manual.   If
       the info and cmp programs are properly installed at your site,
the com‐
       mand

              info diff

       should give you access to the complete manual.
]]
I assumed that was intentional -- perhaps sharing the same code base --
but now I'm wondering if that is also a bug.  In any case, I *did* check
the info page for diff (attached), and it also fails to say anything
about the exit status values.  But even worse, the end of the info page
unhelpfully refers back to itself:
[[
SEE ALSO
       The  full documentation for diff is maintained as a Texinfo
manual.  If
       the info and diff programs are properly installed  at  your
site,  the
       command

              info diff

       should give you access to the complete manual.
]]
So it seems like something is getting mixed up or clobbered somehow.

My version of info:
[[
$ info --version
info (GNU texinfo) 4.13

Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
]]

Anything else I can do to help track down the problem?

Thanks,
David


On Sat, 2011-10-08 at 11:26 -0700, Micah Cowan wrote:
> (2011年10月08日 11:08), Bruce Korb wrote:
> > On 10/08/11 10:44, Micah Cowan wrote:
> >> (2011年10月05日 07:36), David Booth wrote:
> >>> The man page for cmp says of the -s option: "Output nothing; yield exit
> >>> status only."  But nowhere does it say what that exit status will be.
> >
> >> Hm. In my copy it's there:
> >> "Exit status is 0 if inputs are the same, 1 if different, 2 if trouble."
> >>
> >> Could be different versions of diffutils, but then that only begs the
> >> question as to why you didn't mention a version (as is customary in bug
> >> reports). :)
> >>
> >> Additionally, please note that GNU is not in the habit of placing the
> >
> > Hi Micah,
> >
> > Be careful which man page you look at.  There are two:  the one by
> > diffutils and the other from the Austin group (POSIX).  Current POSIX
> > says to have an EXIT STATUS section for POSIX specified commands.
> > coreutils creates man pages by massaging the usage output.  Does
> > diffutils follow this model?  I ask because the usage text
> > never contains exit status.
> 
> In my copy of cmp, it does. I just checked, it's not a Debianization;
> it's in the official GNU tools. "Never say never", at least without
> bothering to check first. ;)
> 
> Did you really think I was referring to a POSIX manpage, on a system
> where I have GNU cmp installed (and where my quote's text differed
> substantially from the POSIX quote you gave)?
> 
> -mjc
> 
> 

-- 
David Booth, Ph.D.
http://dbooth.org/

Opinions expressed herein are those of the author and do not necessarily
reflect those of his employer.

Attachment: diff-info.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]