quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] Re: remove GNU date dependency


From: Gary V. Vaughan
Subject: [Quilt-dev] Re: remove GNU date dependency
Date: Wed, 01 Feb 2006 14:12:58 +0000
User-agent: Thunderbird 1.5 (X11/20051201)

Tag!

Andreas Gruenbacher wrote:
> On Wednesday 01 February 2006 11:44, Gary V. Vaughan wrote:
> > Apparently, perl doesn't use the native strftime... or at least on darwin
> > %z works within perl, but isn't used in Apple's date implementation.
> 
> Okay, that's good for us.
> 
> > Here is a patch for a perl date wrapper (my first perl script!), I hope you
> > can commit this in time for 0.43...  with it, I can `./configure
> > --without-date' and have the testsuite complete successfully.
> 
> Looks very nice. I have only a few comments:
> 
>  * I don't see why we would need the pass_through option;
>    we still fail further below, anyway.

Needed because GetOptions treats `+' as an option delimitter (as in '+%s'),
and otherwise fails with:

  Unknown option: %

>  * You ignore the result of GetOptions, which is only minor.
>  * parse_utc_secs() shouldn't affect the --utc option. Also, the seconds
>    since the epoch are always relative to UTC.
>  * In scalar contect, @ARGV evaluates to $#ARGV + 1.
>  * When you use sub foo() { ... } instead of sub foo { }, the
>    parentheses declare "no parameters". It should be sub
>    parse_utc_secs($) { ... } instead.
>  * "use" inside a subroutine??

Okay, thanks.  Not too many slip ups for my first script in perl ;-) *ahem*

> Can you maybe give the checked-in version a quick check?

With the attached small change, everything is good on darwin!

Cheers,
        Gary.
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
 compat/date.in |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

Index: quilt-HEAD/compat/date.in
===================================================================
--- quilt-HEAD.orig/compat/date.in
+++ quilt-HEAD/compat/date.in
@@ -41,7 +41,7 @@ sub parse_utc_secs($) {
     }
 }
 
-Getopt::Long::Configure("gnu_getopt");
+Getopt::Long::Configure("gnu_getopt", "pass_through");
 
 GetOptions('rfc-822|R' => sub() { $spec = '%a, %d %b %Y %H:%M:%S %z' },
           'utc|universal|u' => \$utc,

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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