From e9afe386c1a80a53f19cd638a2466f74e9a64048 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 24 Jan 2014 13:23:26 -0800 Subject: [PATCH] core: remove BoxUpgradeRequired exception --- lib/vagrant/box_collection.rb | 2 -- lib/vagrant/environment.rb | 10 ++-------- lib/vagrant/errors.rb | 4 ---- templates/locales/en.yml | 4 ---- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/vagrant/box_collection.rb b/lib/vagrant/box_collection.rb index c299ab162..3765d2f47 100644 --- a/lib/vagrant/box_collection.rb +++ b/lib/vagrant/box_collection.rb @@ -56,8 +56,6 @@ module Vagrant # * BoxProviderDoesntMatch - If the given box provider doesn't match the # actual box provider in the untarred box. # * BoxUnpackageFailure - An invalid tar file. - # * BoxUpgradeRequired - You're attempting to add a box when there is a - # V1 box with the same name that must first be upgraded. # # Preconditions: # * File given in `path` must exist. diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index db0d79812..38ced5377 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -348,14 +348,8 @@ module Vagrant load_box_and_overrides = lambda do box = nil if config.vm.box - begin - box = boxes.find(config.vm.box, box_formats, config.vm.box_version) - rescue Errors::BoxUpgradeRequired - # Upgrade the box if we must - @logger.info("Upgrading box during config load: #{config.vm.box}") - boxes.upgrade(config.vm.box) - retry - end + box = boxes.find( + config.vm.box, box_formats, config.vm.box_version) end # If a box was found, then we attempt to load the Vagrantfile for diff --git a/lib/vagrant/errors.rb b/lib/vagrant/errors.rb index 596f073d9..e42a7d402 100644 --- a/lib/vagrant/errors.rb +++ b/lib/vagrant/errors.rb @@ -196,10 +196,6 @@ module Vagrant error_key(:untar_failure, "vagrant.actions.box.unpackage") end - class BoxUpgradeRequired < VagrantError - error_key(:box_upgrade_required) - end - class BoxVerificationFailed < VagrantError error_key(:failed, "vagrant.actions.box.verify") end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index e5e1da6e2..90969d57a 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -376,10 +376,6 @@ en: the provider specified. Please double-check and try again. The providers for this are: %{providers} - box_upgrade_required: |- - The box '%{name}' is still stored on disk in the Vagrant 1.0.x - format. This box must be upgraded in order to work properly with - this version of Vagrant. bundler_disabled: |- Vagrant's built-in bundler management mechanism is disabled because Vagrant is running in an external bundler environment. In these