Ignore "OSE" suffix when checking guest additions versions [closes GH-438]

This commit is contained in:
Mitchell Hashimoto 2011-07-30 10:25:58 -07:00
parent 2ca46ced57
commit 0e7ccf86bc
2 changed files with 10 additions and 4 deletions

View File

@ -3,6 +3,7 @@
- Fix SSH `exec!` to inherit proper `$PATH`. [GH-426] - Fix SSH `exec!` to inherit proper `$PATH`. [GH-426]
- Chef client now accepts an empty (`nil`) run list again. [GH-429] - Chef client now accepts an empty (`nil`) run list again. [GH-429]
- Fix incorrect error message when running `provision` on halted VM. [GH-447] - Fix incorrect error message when running `provision` on halted VM. [GH-447]
- Checking guest addition versions now ignores OSE. [GH-438]
## 0.8.2 (July 22, 2011) ## 0.8.2 (July 22, 2011)

View File

@ -15,10 +15,15 @@ module Vagrant
version = env["vm"].vm.interface.get_guest_property_value("/VirtualBox/GuestAdd/Version") version = env["vm"].vm.interface.get_guest_property_value("/VirtualBox/GuestAdd/Version")
if version.empty? if version.empty?
env.ui.warn I18n.t("vagrant.actions.vm.check_guest_additions.not_detected") env.ui.warn I18n.t("vagrant.actions.vm.check_guest_additions.not_detected")
elsif version != VirtualBox.version else
env.ui.warn(I18n.t("vagrant.actions.vm.check_guest_additions.version_mismatch", # Strip the -OSE/_OSE off from the guest additions
:guest_version => version, version = version.gsub(/[-_]ose/i, '')
:virtualbox_version => VirtualBox.version))
if version != VirtualBox.version
env.ui.warn(I18n.t("vagrant.actions.vm.check_guest_additions.version_mismatch",
:guest_version => version,
:virtualbox_version => VirtualBox.version))
end
end end
# Continue # Continue