Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2008 18:10:51 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Bert JW Regeer <xistence@0x58.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: OpenBSD sdiff Question
Message-ID:  <20080316071050.GA44676@server.vk2pj.dyndns.org>
In-Reply-To: <432044E0-812E-4C13-A62D-EEA7170DADB9@0x58.com>
References:  <20080314231404.GB99765@scruffy.exit2shell.com> <20080315135916.GH68662@dracon.ht-systems.ru> <432044E0-812E-4C13-A62D-EEA7170DADB9@0x58.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080316071050.GA44676>