bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] warning about unknown .wgetrc directives


From: Tim Rühsen
Subject: Re: [Bug-wget] warning about unknown .wgetrc directives
Date: Fri, 04 Apr 2014 21:04:56 +0200
User-agent: KMail/4.11.5 (Linux/3.13-1-amd64; KDE/4.11.5; x86_64; ; )

Am Freitag, 4. April 2014, 17:14:07 schrieb Darshit Shah:
> On Fri, Apr 4, 2014 at 4:40 PM, Giuseppe Scrivano <address@hidden> wrote:
> > Hi Karl,
> > 
> > address@hidden (Karl Berry) writes:
> > > Giuseppe et al.,
> > > 
> > > I suggest making unknown .wgetrc directives a warning (and just ignore
> > > them, proceeding on normally), rather than a failure.  For purposes of
> > > compatibility - a person might have a brand-new wget on system A, but
> > > for whatever reason, have to run an older wget on system B.  But it's
> > > convenient to have the same wget regardless.
> > 
> > In general I tend to agree with you as it makes easier to reuse
> > the .wgetrc file but I think problems with unknown directives should
> > still be threated as errors.
> > It may happen that we will add some security related directive,
> > and while users rely on wget to honor that, wget instead will simply
> > ignore it and give the impression it works.
> > 
> > Unless we add something like --ignore-wgetrc-errors...
> 
> I think that's over-engineering the problem.
> 
> Some time ago, Tim, if I remember correctly proposed using version lines.
> So, newer commands can be marked as valid under a certain version only. The
> whole scheme can be made backward compatible by assuming the lack of a
> version line to imply the current version.

I thought it was about a protocol to support external programs...

But however: we can't fix Karl's problem for now... the machines running an old 
Wget won't update.

So we are talking about future versions and how we deal with such situations 
in the future. And here, a 'version' line could in fact help.

1. Reading a .wgetrc file with none or with a 'known' version: treat unknown 
directives as errors.

2. Reading a .wgetrc file with with a 'future' version: treat unknown 
directives as warnings and continue.

And to make 2. more intelligent, we could use unsharp comparisons:
e.g. we read 'remoteencding' (so something similar to  'remoteencoding') AND 
there is no exact 'remoteencoding' or '#remoteencoding' found in .wgetrc, we 
could error.
Maybe we should put this into a library... it would be useful for many tools 
;-)

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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