mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-14 01:40:34 +00:00
apt: always create new AptPkg::Cache object.
To re-open database - else we get old/cached entries.
This commit is contained in:
parent
b688d4389b
commit
c06e9cc8cf
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user