Commit 1163ee63 authored by Dietmar Maurer's avatar Dietmar Maurer

apt: always create new AptPkg::Cache object.

To re-open database - else we get old/cached entries.
parent 6916396a
...@@ -18,13 +18,9 @@ use AptPkg::Cache; ...@@ -18,13 +18,9 @@ use AptPkg::Cache;
use AptPkg::Version; use AptPkg::Version;
use AptPkg::PkgRecords; use AptPkg::PkgRecords;
my $apt_cache;
my $get_apt_cache = sub { my $get_apt_cache = sub {
return $apt_cache if $apt_cache; my $apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n";
$apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n";
return $apt_cache; return $apt_cache;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment