Skip to content
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

Add vagrant-box-updater plugin to make further standardization possible #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

patcon
Copy link
Member

@patcon patcon commented Jun 5, 2013

Wow. Had never thought to implement a plugin for this, but have definitely been bitten by the fact that, depending on when you first run vagrant, you might have vastly different basebox versions.

https://github.com/spil-ruslan/vagrant-box-updater

This plugin simply checks when a box is updated, notifies you of the modification date, and asks whether you'd like to update.

@patcon
Copy link
Member Author

patcon commented Jun 5, 2013

In order for this plugin to work properly, the user needs to remove and re-add the necessary boxes:

vagrant plugin install vagrant-box-updater
vagrant box remove precise64
# `vagrant up` if using box_url config or...
vagrant box add precise64 http://files.vagrantup.com/precise64.box

We could try to explain this in the README, but might be simpler to create a rake task? That way, we could tell the user to run something like rake reinstall_basebox if they have that issue, and have something friendly like this run in the task:

if File.exists? File.expand_path("~/.vagrant.d/#{box_name}.stats")
  system "vagrant box remove #{box_name}"
  system "vagrant box add #{box_name} #{box_url}"
end

Even if they don't do this, the plugin won't crash the vagrant run -- it just won't do anything useful :)

@dasrecht
Copy link
Contributor

👍 for a merge :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants