Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Apr 2004 11:05:44 +0400
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        Tim Kientzle <tim@kientzle.com>
Cc:        src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/pkg_install/lib file.c
Message-ID:  <20040408070543.GA50138@nagual.pp.ru>
In-Reply-To: <4074F596.2020401@kientzle.com>
References:  <200404080606.i3866g3q063716@repoman.freebsd.org> <20040408062121.GA49250@nagual.pp.ru> <4074F596.2020401@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 07, 2004 at 11:47:50PM -0700, Tim Kientzle wrote:
>  * Not all platforms have getopt_long(), and I intend for
>    bsdtar to be usable on systems that only have getopt().
>    The "-" extension is certainly not standard across getopt()
>    implementations.  (bsdtar currently has a couple of
>    long options with no short equivalent; I do intend to
>    address that.)

I do not suggest to use initial "-" for getopt() options, only for
getopt_long() short options. It means that on platforms without
getopt_long() args/options can't be intermixed or, alternatively, you can
include BSDL copy of getopt_long() from our libc with your program.

>  * According to the getopt_long man page, there is
>    some disagreement about the handling of that leading
>    "-" in the presence of POSIXLY_CORRECT.  I'd prefer
>    to avoid such ambiguities where possible.

This is NetBSD-sm, they try to mimic GNU getopt_long() which is right,
since it originates from there, but at some point they think they are
smarter than GNU (which leads to breaking some legal getopt_long()  
usage, f.e. gas becomes broken). How to deal with it, see above, i.e.
include our getopt_long().

> As I said, I could be convinced to do as you suggest, but I'm
> pretty comfortable with the option parsing of bsdtar
> as it stands.

BTW, could you please implement -S, --sparse? It is very needed to 
backup/restore large (and mostly null-filled) databases. There can be 
cases, when you restore database without -S, it can lead to disk 
space overflow, since it created as sparse at physical level and occupes 
less space.

-- 
Andrey Chernov | http://ache.pp.ru/



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