Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#527848: Workaround

0 views
Skip to first unread message

Stefan Lüthje

unread,
Jul 3, 2009, 6:00:18 AM7/3/09
to
Hi all,

I've added a line to the scripts. That should help:

sub read_cache {
my $file = shift;
my $config = shift;
my $globals = {};

%{$config} = ();
## read the cache file ignoring anything on the command-line.
if (-e $file) {
my %saved = %opt;
%opt = ();
$saved_cache = _read_config($config, $globals, "##\\s*$program-$version\\s*", $file);
%opt = %saved;

foreach my $h (keys %cache) {
if (exists $config{$h}) {
foreach (qw(atime mtime wtime ip status)) {
$config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_};
######### New line:
$config{$h}{$_} = $saved{$_} if exists $saved{$_};
}
}
}
}
}

Regards

Stefan

--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org

Torsten Landschoff

unread,
Jul 3, 2009, 7:30:12 PM7/3/09
to
Hi Stefan,

On Fri, Jul 03, 2009 at 11:42:51AM +0200, Stefan Lüthje wrote:
> I've added a line to the scripts. That should help:
>
> sub read_cache {
> my $file = shift;
> my $config = shift;
> my $globals = {};
>
> %{$config} = ();
> ## read the cache file ignoring anything on the command-line.
> if (-e $file) {
> my %saved = %opt;
> %opt = ();
> $saved_cache = _read_config($config, $globals, "##\\s*$program-$version\\s*", $file);
> %opt = %saved;
>
> foreach my $h (keys %cache) {
> if (exists $config{$h}) {
> foreach (qw(atime mtime wtime ip status)) {
> $config{$h}{$_} = $cache{$h}{$_} if exists $cache{$h}{$_};
> ######### New line:
> $config{$h}{$_} = $saved{$_} if exists $saved{$_};

Did you test that change? For me this looks like the ip from the command line
is put into the cache information for that host as well, which is plain wrong.
Or did I misread something?

Greetings, Torsten

0 new messages