-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve package guard system to handle hotfixes #51
Conversation
@olivierlemasle & @meknipp have you been able to test this? |
Yes, I've tested it and the installation of .Net 4.6 fails with my box on this branch. I'd like to test again with a minimal test case to reproduce the issue. |
Hum that's sad. Let me know if I can help. I'll provide a cleaner patch, rebased on master very soon. |
0fe9729
to
e50686b
Compare
Hi @Annih, Sorry for the delay; I ran a lot of tests in order to undestand the issue I had on this branch. I tested the installation of .Net 4.6 on my Windows 2012 R2 box with no update. More specifically, I used the box "virtualbox/eval-win2012r2-standard" created with https://github.com/boxcutter/windows (with boxcutter/windows#91 merged). I used Kitchen to test the installation (but I tested only
On both branches
However, it does not install patch KB3083186 as after the last reboot, .Net 4.6 is considered already installed. If I keep commit f585848, the installation tries to continue to install patches (I read your comment #55 (comment), so I understand it was the goal). However, the installation of patch ndp46-kb3083186-x64.exe fails:
Reading https://www.microsoft.com/en-US/download/details.aspx?id=48450, I think it's just because this patch does not apply for Windows 2012 R2. I tried to install this patch manually and I had the following error:
So it seems there's indeed a bug regarding patches, but totally unrelated to this pull request. Therefore, regarding this pull request, 👍 for me, thanks! |
Wow that's a very detailed answer @olivierlemasle. You have discovered yet another bug here. KB3083186 is not applicable on recent Windows version. I'll fix travis issues for this PR, and create another one for the faulty patch :) |
67b8e86
to
212fb35
Compare
@jmauro this patch has been rebased :) |
resources/framework.rb
Outdated
@@ -100,10 +111,6 @@ def should_reboot? | |||
new_resource.perform_reboot && reboot_pending? | |||
end | |||
|
|||
def version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definition is not used anymore?
@jmauro comment taken into account :) |
Test are failing... Rubucop rule: |
Still not rubocop compliant :D |
Most hotfixes requires a WMI query to detect whether they are installed or not. Hotfixes maybe superseded by others and can't be installed when a superseding package is already present. To handle these case, update the semantic of the `not_if` field of the packages definition: * A String `not_if` value is a command to execute. * A Array `not_if` value is a list of hotfixes to check using wmi. Wmi-lite is used to perform a single query for all hotfixes. If any of the defined hotfixes is present, the package won't be installed. This should fix #45 & #54. Tests and README.md have been updated accordingly.
Now it is |
Most hotfixes requires a WMI query to detect whether they are installed
or not. Hotfixes maybe superseded by others and can't be installed when
a superseding package is already present.
To handle these case, update the semantic of the
not_if
field of thepackages definition:
not_if
value is a command to execute.not_if
value is a list of hotfixes to check using wmi.Wmi-lite is used to perform a single query for all hotfixes. If any
of the defined hotfixes is present, the package won't be installed.
This should fix #45 & #54.
Tests and README.md have been updated accordingly.
Cc. @aboten