From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 16 07:10:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0BDB106566B for ; Sun, 16 Mar 2008 07:10:57 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail15.syd.optusnet.com.au (mail15.syd.optusnet.com.au [211.29.132.196]) by mx1.freebsd.org (Postfix) with ESMTP id 72F608FC1C for ; Sun, 16 Mar 2008 07:10:57 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail15.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m2G7ApR8000664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 16 Mar 2008 18:10:53 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m2G7ApgJ055797; Sun, 16 Mar 2008 18:10:51 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m2G7ApTg055796; Sun, 16 Mar 2008 18:10:51 +1100 (EST) (envelope-from peter) Date: Sun, 16 Mar 2008 18:10:51 +1100 From: Peter Jeremy To: Bert JW Regeer Message-ID: <20080316071050.GA44676@server.vk2pj.dyndns.org> References: <20080314231404.GB99765@scruffy.exit2shell.com> <20080315135916.GH68662@dracon.ht-systems.ru> <432044E0-812E-4C13-A62D-EEA7170DADB9@0x58.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ReaqsoxgOBHFXBhH" Content-Disposition: inline In-Reply-To: <432044E0-812E-4C13-A62D-EEA7170DADB9@0x58.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD Hackers Subject: Re: OpenBSD sdiff Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 07:10:57 -0000 --ReaqsoxgOBHFXBhH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 15, 2008 at 03:21:01PM -0700, Bert JW Regeer wrote: >Even if BSD has no tradition to keep a separate program version, it is=20 >still very handy to be able to give this data to other developers if=20 >something is failing. Programs that don't have a -v or --version switch ar= e=20 >frustrating to people who are trying to find a workaround for a bug that i= s=20 >in that program, or when looking at documentation online, when the=20 >documentation is for one version and not for a newer version. This demonstrates the difference between the BSD approach of having a complete, integrated operating system, and the GNU/Linux approach of having a variety of packages, each of different versions, which were riginally intended to supplant the vendor-provided versions of those utilities. A single string like "sdiff (GNU diffutils) 2.8.7" can only report that the sdiff you are using is part of GNU diffutils version 2.8.7. It is not particularly useful for reporting a failure because that failure is equally likely to be in (eg) glibc (the version of which is not reported). For a FreeBSD tool, the closest thing to a simple version number would be __FreeBSD_version. >Dropping -v would be a bad thing, and make the tools not compatible, thus= =20 >breaking many scripts that do expect a -v. The only sensible reason for a script to invoke a tool with '-v' would be to try and determine whether that tool has some feature/defect that the script needs to know about. In this case, the reported version number needs to be both in a format that the script can parse and have values that the script recognizes. If a script expects to see: >> $ sdiff -v >> sdiff (GNU diffutils) 2.8.7 >> Written by Thomas Lord. >> >> Copyright (C) 2004 Free Software Foundation, Inc. >> This is free software; see the source for copying conditions. There is = NO >> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPO= SE. Then it is likely to choke on (eg) $ sdiff -v sdiff (FreeBSD) 700055 --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --ReaqsoxgOBHFXBhH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfcx/oACgkQ/opHv/APuIce6ACffXXCJoQDi/qsjoBhI+dC5URU XJEAnRNwLdHcUwqaOqtFlCvlDc3gQ6en =bhYP -----END PGP SIGNATURE----- --ReaqsoxgOBHFXBhH--