Paul Slootman <[EMAIL PROTECTED]> wrote:
> I had a report from one of the users of the debian wwwoffle package,
> that he upgraded to 2.6x (presumably from 2.5) and that the changed
> matching caused a couple of large caches he had to be wiped out.
> He had a specific age line for those sites with an extremely high
> value, and the default age = 28. That default age = 28 line didn't
> get resorted (it should be moved to below all other age lines!), and
> hence the url-specific lines aren't used at all. The result was a
> purge to 28 days of the complete cache.
>
> Hence the upgrade-config.pl script should also resort the plain
> age = line. I attempted to fix it, but for some reason I don't
> quite grok how the script works :-/
The upgrade-config.pl script does attempt to re-sort the options.
When I looked in detail though I find that it misses out the default
option and doesn't resort it to the very bottom of the list.
The patch below should be applied to the upgrade-config.pl script, it
will fix the problem by looking for the "default" option in the old
config file and moving it to the bottom.
-------------------- patch --------------------
--- upgrade-config.pl 2001/05/23 18:54:59 1.20
+++ upgrade-config.pl 2001/07/20 18:29:56
@@ -473,18 +473,19 @@
# Sort the purge ages to use "first found" rather than "longest match".
-$resort_regexp="($urlspec) *= *[^ \t\r\n]+";
+$resort_regexp="($urlspec|default) *= *[^ \t\r\n]+";
sub sortbyurllength
{
$a =~ m/$resort_regexp/;
$urla=$1;
$urla=~ y/*//;
- $lena=length $1;
+ $urla="" if($urla eq "default");
$b =~ m/$resort_regexp/;
$urlb=$1;
$urlb=~ y/*//;
+ $urlb="" if($urlb eq "default");
length $urlb <=> length $urla;
}
-------------------- patch --------------------
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
WWWOFFLE users page:
http://www.gedanken.demon.co.uk/wwwoffle/version-2.6/user.html