mitchellh/vagrant — Issue #730: vagrant package breaks, when --output is a path
Author: jbraeuer
Created: 2012-02-10 17:19:47+00:00
State: open

Hi,

when I package a machine, and `--output` is a path (so not just a filename), package breaks. Looks like the compression stage uses --output relative, while export does not.

Here is one example

kermit@kermitws:~/tmp/2$ /var/lib/gems/1.8/bin/vagrant package --base vagrant-ubuntu1110-amd64 --output ~/tmp/oneiric-amd64-2.box
[vagrant-ubuntu1110-amd64] Clearing any previously set forwarded ports...
[vagrant-ubuntu1110-amd64] Creating temporary directory for export...
[vagrant-ubuntu1110-amd64] Exporting VM...
[vagrant-ubuntu1110-amd64] Compressing package to: /home/kermit/tmp/2/home/kermit/tmp/oneiric-amd64-2.box
/var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/general/package.rb:73:in `initialize': No such file or directory - /home/kermit/tmp/2/home/kermit/tmp/oneiric-amd64-2.box (Errno::ENOENT)
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/general/package.rb:73:in `open'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/general/package.rb:73:in `compress'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/general/package.rb:34:in `general_call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/package.rb:18:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/package_vagrantfile.rb:20:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/export.rb:22:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/clear_shared_folders.rb:13:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/clear_forwarded_ports.rb:13:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/halt.rb:27:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/discard_state.rb:17:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/general/validate.rb:14:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/check_accessible.rb:18:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/vm/setup_package_files.rb:49:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/general/validate.rb:14:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/warden.rb:33:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/builder.rb:92:in `call'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/runner.rb:49:in `run'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/util/busy.rb:19:in `busy'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/action/runner.rb:49:in `run'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/vm.rb:192:in `run_action'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/vm.rb:139:in `package'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/command/package.rb:68:in `package_vm'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/command/package.rb:50:in `package_base'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/command/package.rb:38:in `execute'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/cli.rb:38:in `execute'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/lib/vagrant/environment.rb:156:in `cli'
from /var/lib/gems/1.8/gems/vagrant-0.9.7/bin/vagrant:43
from /var/lib/gems/1.8/bin/vagrant:19:in `load'
from /var/lib/gems/1.8/bin/vagrant:19