Removed obsolete function.
Added debug logging to check installed patches.
This commit is contained in:
parent
532b679a4d
commit
444efeabeb
43
pkgtool.pm
43
pkgtool.pm
|
@ -734,6 +734,7 @@ sub read_os_patches ($$$)
|
|||
$$p{Flags} |= $state;
|
||||
$$p{Current} = 1 if $state & 0x20;
|
||||
}
|
||||
print_log('global', DEBUG3, 'Found OS patch information for %s: kbnum=%s current=%s', $kb, $number, $$p{Current});
|
||||
}
|
||||
if ($name =~ /^([^~]*)~([^~]*)~([^~]*)~([^~]*)~([^~]*)$/o) {
|
||||
my $pkg = $$pkgs{$name};
|
||||
|
@ -764,44 +765,6 @@ sub read_os_patches ($$$)
|
|||
}
|
||||
}
|
||||
|
||||
sub xread_pkg_patches ($$$)
|
||||
{
|
||||
my ($patches, $pkgs, $registry) = @_;
|
||||
|
||||
foreach my $pkgname ($registry->SubKeyNames) {
|
||||
my $pkg = $registry->{$pkgname};
|
||||
next unless defined $pkg;
|
||||
foreach my $kbname ($pkg->SubKeyNames) {
|
||||
next unless defined $kbname && $kbname =~ /KB(\d[0-9a-zA-Z]+)/o;
|
||||
my $kb =$1;
|
||||
my $sub = $pkg->{$kbname};
|
||||
next unless defined $sub;
|
||||
my $installername = get_registry_value($sub->{'InstallerName'});
|
||||
my $state = get_registry_value($sub->{'ThisVersionInstalled'});
|
||||
my $update = defined $installername && $installername eq 'Windows Installer';
|
||||
my $number = $kb =~ /^(\d+)/o ? $1 : $kb;
|
||||
my $p = $$patches{$kb};
|
||||
if (! defined $p) {
|
||||
$p = $$patches{$kb} = {
|
||||
Type => 'Package',
|
||||
Packages => {},
|
||||
InstallClient => $installername,
|
||||
Original => ! $update,
|
||||
Update => $update,
|
||||
KB => $kb,
|
||||
Number => $number,
|
||||
Flags => 0
|
||||
};
|
||||
}
|
||||
${$$p{Packages}}{$pkgname} = 1;
|
||||
if (defined $state && $state eq 'Y') {
|
||||
$$p{Flags} |= 0x20;
|
||||
$$p{Current} = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub read_pkg_patches ($$$)
|
||||
{
|
||||
my ($patches, $pkgs, $registry) = @_;
|
||||
|
@ -849,7 +812,8 @@ sub read_pkg_patches ($$$)
|
|||
if (defined $state && $state =~ /^1$/o) {
|
||||
$$p{Flags} |= 0x20;
|
||||
$$p{Current} = 1;
|
||||
}
|
||||
}
|
||||
print_log('global', DEBUG3, 'Found package patch information for %s/%s: kbnum=%s current=%s', $kb, $pkgname, $number, $$p{Current});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -946,7 +910,6 @@ sub read_installed_patches ($)
|
|||
$$db{Patches} = $patches;
|
||||
$$db{Pkgs} = $pkgs;
|
||||
return $db;
|
||||
|
||||
}
|
||||
|
||||
sub refresh_installed_patches ($)
|
||||
|
|
Loading…
Reference in a new issue