t9md / vagrant-snap

snapshoft management plugin for vagrant
MIT License
117 stars 5 forks source link

Does not work under Vagrant 0.9.3 #6

Closed stigkj closed 12 years ago

stigkj commented 12 years ago

I really like this plugin, but it did not work under Vagrant 0.9.3, giving this exception:

/Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-snap-0.09/lib/vagrant_snap.rb:94:in `<module:Snap>': uninitialized constant Vagrant::Command::GroupBase (NameError)
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-snap-0.09/lib/vagrant_snap.rb:3:in `<top (required)>'
    from /Users/gits/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `require'
    from /Users/gits/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:58:in `rescue in require'
    from /Users/gits/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-snap-0.09/lib/vagrant_init.rb:2:in `<top (required)>'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:76:in `load'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:76:in `initialize'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:58:in `new'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:58:in `block (2 levels) in load!'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:43:in `each'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:43:in `block in load!'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:38:in `each'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant/plugin.rb:38:in `load!'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/lib/vagrant.rb:185:in `<top (required)>'
    from /Users/gits/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/gits/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/gems/vagrant-0.9.3/bin/vagrant:3:in `<top (required)>'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/bin/vagrant:19:in `load'
    from /Users/gits/.rvm/gems/ruby-1.9.2-p180/bin/vagrant:19:in `<main>'
t9md commented 12 years ago

This issue is caused by vanrant's API change, it drop dependency of Thor, so I need rewrite completely to work again.

I think I will try if my free time is available, but currently I don't use vagrant actively, so please wait without expecting.

stigkj commented 12 years ago

No worries, I will just do it manually from VirtualBox for now. If I get the time, maybe I will look into it myself, but I guess it is not very likely. My todo-list is far from empty ;-)

t9md commented 12 years ago

OK. Now I published vagrant-snap 0.10 which support vagrant-0.9.X, I only do simple check, and code is a little dirty and not consistent, but WORK!

stigkj commented 12 years ago

Wow, that was fast! Thank! I tested a little bit without any problems.

The only thing that could be improved upon is the "progress" output, that is, it is not updating "in place", but instead it gets output like this:

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

Not sure if this worked in 0.9. Should I open a new ticket for this, maybe?

t9md commented 12 years ago

vagrant-snap call system() method to execute "vboxmanage" comand which is provided as part of VirtualBox package. To implement your suggestion, I need parase output of "vboxmanage" and clean output. I think it inttroduce new low level dependency, I don't want to implement it. So sorry I'm not willing to implement it.

t9md commented 12 years ago

Now close.