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

Explicit failure for arch64 template and use latest image #1112

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

Conversation

ibizaman
Copy link

@ibizaman ibizaman commented Sep 16, 2018

Because archlinux changed its repo location, the current md5 uri
returns a 301 moved permanently message. Then using .body.split on it
made the iso and iso_md5 variables be nil. And then veewee choked on
that.

Before this commit, this is the actual message you get in this case:

$ bundle exec veewee vbox build -w myarch

Downloading vbox guest additions iso v 5.2.18 - http://download.virtualbox.org/virtualbox/5.2.18/VBoxGuestAdditions_5.2.18.iso
Checking if isofile VBoxGuestAdditions_5.2.18.iso already exists.
Full path: veewee/iso/VBoxGuestAdditions_5.2.18.iso

The isofile VBoxGuestAdditions_5.2.18.iso already exists.
Building Box mesh with Definition mesh:
- debug : false
- cwd : veewee/
- force : false
- nogui : false
- auto : false
- checksum : false
- redirectconsole : false
- postinstall_include : []
- postinstall_exclude : []
- skip_to_postinstall : false
bundler: failed to load command: veewee (~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/bin/veewee)
TypeError: no implicit conversion of nil into String
  ~/veewee/lib/veewee/provider/core/helper/iso.rb:113:in `join'
  ~/veewee/lib/veewee/provider/core/helper/iso.rb:113:in `verify_iso'
  ~/veewee/lib/veewee/provider/core/box/build.rb:101:in `build'
  ~/veewee/lib/veewee/provider/virtualbox/box/build.rb:10:in `build'
  ~/veewee/lib/veewee/command/vbox.rb:22:in `build'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:115:in `invoke'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor.rb:238:in `block in subcommand'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_command'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
  ~/tmp/veewee/bin/veewee:24:in `<top (required)>'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/bin/veewee:23:in `load'
  ~/.rbenv/versions/2.2.6/lib/ruby/gems/2.2.0/bin/veewee:23:in `<top (required)>'

The first commit actually makes the error message explicit:

  Could not instantiate the box mesh with provider Virtualbox ,Error in the definition from file veewee/definitions/mesh/definition.rb
  Could not download from http://mirrors.kernel.org/archlinux/iso/latest/md5sums.txt: [301] #<Net::HTTPMovedPermanently:0x007fe277b9e9c8>
  Error in the definition from file veewee/definitions/mesh/definition.rb
  Could not download from http://mirrors.kernel.org/archlinux/iso/latest/md5sums.txt: [301] #<Net::HTTPMovedPermanently:0x007fe277b9e9c8>

And the second commit switches to the correct new base uri and uses also the latest image always now.

The last two commits were needed to successfully have a base image.

ibizaman added 4 commits September 16, 2018 10:55
Because archlinux changed its repo location, the current md5 uri
returns a 301 moved permanently message. Then using .body.split on it
made the iso and iso_md5 variables be nil. And then veewee choked on
that.

Before this commit, this is the actual message you get in this case:

  TypeError: no implicit conversion of nil into String
  veewee/lib/veewee/provider/core/helper/iso.rb:113:in `join'
  veewee/lib/veewee/provider/core/helper/iso.rb:113:in `verify_iso'
  veewee/lib/veewee/provider/core/box/build.rb:101:in `build'
  veewee/lib/veewee/provider/virtualbox/box/build.rb:10:in `build'
  veewee/lib/veewee/command/vbox.rb:22:in `build'
  ...

This commit actually makes the error message explicit:

  Could not instantiate the box mesh with provider Virtualbox ,Error in the definition from file veewee/definitions/mesh/definition.rb
  Could not download from http://mirrors.kernel.org/archlinux/iso/latest/md5sums.txt: [301] #<Net::HTTPMovedPermanently:0x007fe277b9e9c8>
  Error in the definition from file veewee/definitions/mesh/definition.rb
  Could not download from http://mirrors.kernel.org/archlinux/iso/latest/md5sums.txt: [301] #<Net::HTTPMovedPermanently:0x007fe277b9e9c8>
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.

1 participant