tech-pkg archive

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

Re: "sa-update" in SpamAssassin 3.4.0



On Sat, 26 Apr 2014 11:29:31 +0100
Matthias Scheler <tron%zhadum.org.uk@localhost> wrote:
> the "sa-update" script in SpamAssassin 3.4.0 (I've got a package which
> I'm currently testing) contains the following code:
> 
> # Do a GET request via HTTP for a given URL using an external program,
> # or fall back to LWP if no external downloading program is available.

Looks like there is a fallback if no external programs are loaded.

> # Use the optional time_t value to do an IMS GET
> sub http_get {
> [...]
>   foreach my $try_prog ('curl', 'wget', 'fetch') {
>     $cmd =
> Mail::SpamAssassin::Util::find_executable_in_env_path($try_prog); if
> (defined $cmd && $cmd ne '') { $ext_prog = $try_prog; last } }
> [...]
> 
> So basically it checks for a bunch of external programs and uses them
> if available. If none can be found it uses the Perl library.
> 
> The result on my system is that it uses "curl" because that is
> installed anyway. What would be the appropriate way to handle this?
> Should I add a dependence on "curl" to get predictable behaviour?

Does using wget, fetch or the builtin function break something?  What
does "predictable" buy you in this case?

-- 
D'Arcy J.M. Cain <darcy%NetBSD.org@localhost>
http://www.NetBSD.org/ IM:darcy%Vex.Net@localhost


Home | Main Index | Thread Index | Old Index