findutils-patches
[Top][All Lists]
Advanced

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

Re: [Findutils-patches] [PATCH] Emit version banner in GNU preferred for


From: Eric Blake
Subject: Re: [Findutils-patches] [PATCH] Emit version banner in GNU preferred format.
Date: Sat, 21 Jul 2007 15:53:38 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070716 Thunderbird/2.0.0.5 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to James Youngman on 7/21/2007 12:07 PM:
> 2007-07-21  James Youngman  <address@hidden>
> 
>       Version banners now comply with the GNU coding standard.

Nice, except for some nits...

> +display_findutils_version(const char *official_name)
> +{
> +  /* We use official_name rather than program name in the version 
> +   * information.  This is deliberate, it is specified by the 
> +   * GNU coding standard.
> +   */
> +  fflush (stderr);
> +  version_etc(stdout,
> +           official_name, "GNU findutils", version_string,

You could be using PACKAGE_NAME from config.h rather than open-coding the
name.

> +           "Eric B. Decker",
> +           "James Youngman",
> +           "Kevin Dalley",

These names need translation (in the case of languages that transliterate
the name into something pronounceable to the native speaker):
http://www.gnu.org/software/gettext/manual/gettext.html#Names

> +++ b/locate/updatedb.sh
> @@ -21,6 +21,20 @@
>  #exec 2> /tmp/updatedb-trace.txt 
>  #set -x
>  
> +version() {
> +cat <<EOF
> +updatedb (GNU findutils) @VERSION@
> +Copyright (C) 2007 Free Software Foundation, Inc.
> +License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>

Oops - you meant GPLv3+, I assume.

> +Built using GNU gnulib version 2007-07-07

You should really put the gnulib date inside a @SUBST@ picked up when
converting from the template to the actual shell script, like you do with
@address@hidden

> -    --version) echo "GNU updatedb version @VERSION@"; exit 0 ;;
> +    --version) version; exit 0 ;;

Still not 100% compliant - it doesn't detect write errors.  Try
'updatedb --version >/dev/full' for an example, and contrast with
coreutils' groups command.

>      --help) echo "$usage"; exit 0 ;;

Ditto for updatedb --help.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGooBi84KuGfSFAYARAtR0AKDPFtXBmt/M8RdaGineXvcovY3dLwCeJDUC
Uk9+DRHGRDb3QjTJp1GnGCg=
=5Go1
-----END PGP SIGNATURE-----




reply via email to

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