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;
use AptPkg::Version;
use AptPkg::PkgRecords;
my $apt_cache;
my $get_apt_cache = sub {
return $apt_cache if $apt_cache;
$apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n";
my $apt_cache = AptPkg::Cache->new() || die "unable to initialize AptPkg::Cache\n";
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