Surlignage Joey Hess <[EMAIL PROTECTED]>: > > - call Cache::shutdown in File::shutdown to synchronize data between > > cache and file. > > I've applied the other patches, but it seems that this part of the patch > has a bug. True
> I'm also interested to know whether you found an actual problem that > your change above fixes. > The problem is that all drivers use Cache::shutdown except File driver. And after a shutdown, all items are not dirty except using File driver. It is not a bug, but if we re-init the driver after a shutdown, there will be items in dirty state but they should not be. So if we don't use Cache:shutdown, we have to reset the dirty flag in File::shutdown by adding this line in File.pm: foreach my $item (sort keys %{$this->{cache}}) { next unless defined $this->{cache}->{item}; # skip deleted $this->{format}->write($fh, $this->{cache}->{$item}, item); + $this->{dirty}->{$item}=0 if defined $this->{dirty}->{$item}; } and the unit tests will work ;) : ./test_debconf.pl Test::Debconf::DbDriver::FileTest ..... OK (5 tests) > -- > see shy jo > ------------------------------------------------- envoyé via Webmail/IMAG !