[PATCH 1/2] wget: make default timeout configurable, remove a duplicate line

Harald Becker ralda at gmx.de
Fri Oct 18 09:00:12 UTC 2013


Hi Lauri !

>> >> GNU wget does kinda cater to this use: you can specify it in
>> >> the .wgetrc file, but then that's only portable to GNU wget.
>> >How about adding limited support for .wgetrc then (only for
>> >timeouts)?
>> Support for .wgetrc is much bloat. What about looking for
>> environment variable WGET_TIMEOUT? Ok it is not compatible with
>> other other wget versions, but BB wget isn't neither. 
>
>Checking for an env var would be more size.

More size than compile time constant, but much less then
supporting a ".wgetrc" file.

>Having it as a compile-time configure option means no size
>change, and we don't need the default to change at runtime.

... but you need to think about this timeout before building
Busybox and can't change that afterward in runtime environment.
So another option to think about before build, you actually don't
care during first config. And as soon as you use Busybox wget
and know the value, you need to reconfigure/build.

IMO it is best to have a sane, all purpose compile time constant,
and the possibility to overwrite this constant during runtime
with an environment variable.

There is nothing wrong to have such a constant as a #define at
start of the applet source, but do we pollute the configuration
step with this constant?

--
Harald


More information about the busybox mailing list