summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordheerajd-msys <dheeraj.dubey@msystechnologies.com>2020-04-10 17:17:36 +0530
committerdheerajd-msys <dheeraj.dubey@msystechnologies.com>2020-04-14 18:29:29 +0530
commit41d57c58d0715718d7088ba3528665b4527c2154 (patch)
tree03fff84fab32c61100c7aa68e0cffad3e8a573fd
parent3dba6a3ce898b246e101a12e9736dc8b1521f0d6 (diff)
downloadchef-41d57c58d0715718d7088ba3528665b4527c2154.tar.gz
fix msu pkg cumulative updates
Signed-off-by: dheerajd-msys <dheeraj.dubey@msystechnologies.com>
-rw-r--r--lib/chef/provider/package/cab.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/package/cab.rb b/lib/chef/provider/package/cab.rb
index 71c649173f..7a5dba68e5 100644
--- a/lib/chef/provider/package/cab.rb
+++ b/lib/chef/provider/package/cab.rb
@@ -74,7 +74,7 @@ class Chef
def dism_command(command)
with_os_architecture(nil) do
- result = shell_out("dism.exe /Online /English #{command} /NoRestart", { timeout: new_resource.timeout })
+ result = shell_out("dism.exe /Online /English #{command} /NoRestart", { timeout: new_resource.timeout || 3600 })
if result.exitstatus == -2146498530
raise Chef::Exceptions::Package, "The specified package is not applicable to this image." if result.stdout.include?("0x800f081e")
@@ -93,7 +93,7 @@ class Chef
split_package_identity(p["package_identity"])
end
found_packages = existing_package_identities.select do |existing_package_ident|
- existing_package_ident["name"] == package["name"]
+ existing_package_ident["version"] == package["version"].chomp && existing_package_ident["name"] == package["name"]
end
if found_packages.empty?
nil