Your message dated Sat, 18 Feb 2017 13:03:11 -0200
with message-id <[email protected]>
and subject line Re: vagrant plugin helper does not install error messages
has caused the Debian Bug report #838898,
regarding vagrant plugin helper does not install error messages
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
838898: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838898
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vagrant
Version: 1.8.5+dfsg-2

I recently packaged a few vagrant plugins, which was really easy thanks
to the work in the vagrant package.  So thanks for that.  There is one
thing missing from the vagrant plugin helper: installing the error
messages in the locales/ dir.  vagrant-libvirt handles this with a
custom patch, but since having error messages in locales/en.yml seems to
be a common pattern, the vagrant plugin helper should automatically

For an example of this problem, install 'vagrant-mutate' then uninstall
'qemu-utils'.  Running the mutate plugin should give an error message
about missing qemu-img, but instead it gives a ruby stacktrace about
missing the locales/en.yml file:

$ vagrant mutate jessie64 libvirt
/usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:184:in `rescue in
load_yml': can not load translations from /usr/lib/ruby/locales/en.yml:
#<Errno::ENOENT: No such file or directory @ rb_sysopen -
/usr/lib/ruby/locales/en.yml> (I18n::InvalidLocaleData)
 from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:181:in `load_yml'
 from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:165:in `load_file'
 from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:15:in `block in
load_translations'
 from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:15:in `each'
 from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:15:in
`load_translations'
 from /usr/lib/ruby/vendor_ruby/i18n/backend/simple.rb:57:in
`init_translations'
 from /usr/lib/ruby/vendor_ruby/i18n/backend/simple.rb:40:in
`available_locales'
 from /usr/lib/ruby/vendor_ruby/i18n/config.rb:43:in `available_locales'
 from /usr/lib/ruby/vendor_ruby/i18n/config.rb:49:in `available_locales_set'
 from /usr/lib/ruby/vendor_ruby/i18n.rb:278:in `locale_available?'
 from /usr/lib/ruby/vendor_ruby/i18n.rb:284:in `enforce_available_locales!'
 from /usr/lib/ruby/vendor_ruby/i18n.rb:151:in `translate'
 from /usr/lib/ruby/vendor_ruby/vagrant/errors.rb:103:in `translate_error'
 from /usr/lib/ruby/vendor_ruby/vagrant/errors.rb:72:in `initialize'
 from /usr/lib/ruby/vendor_ruby/vagrant-mutate/qemu.rb:8:in `exception'
 from /usr/lib/ruby/vendor_ruby/vagrant-mutate/qemu.rb:8:in `fail'
 from /usr/lib/ruby/vendor_ruby/vagrant-mutate/qemu.rb:8:in
`verify_qemu_installed'
 from /usr/lib/ruby/vendor_ruby/vagrant-mutate/mutate.rb:40:in `execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
 from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
 from /usr/bin/vagrant:173:in `<main>'

--- End Message ---
--- Begin Message ---
On Mon, 26 Sep 2016 10:45:54 +0200 Hans-Christoph Steiner <[email protected]> wrote:
> 
> Package: vagrant
> Version: 1.8.5+dfsg-2
> 
> I recently packaged a few vagrant plugins, which was really easy thanks
> to the work in the vagrant package.  So thanks for that.  There is one
> thing missing from the vagrant plugin helper: installing the error
> messages in the locales/ dir.  vagrant-libvirt handles this with a
> custom patch, but since having error messages in locales/en.yml seems to
> be a common pattern, the vagrant plugin helper should automatically
> 
> For an example of this problem, install 'vagrant-mutate' then uninstall
> 'qemu-utils'.  Running the mutate plugin should give an error message
> about missing qemu-img, but instead it gives a ruby stacktrace about
> missing the locales/en.yml file:
> 
> $ vagrant mutate jessie64 libvirt
> /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:184:in `rescue in
> load_yml': can not load translations from /usr/lib/ruby/locales/en.yml:
> #<Errno::ENOENT: No such file or directory @ rb_sysopen -
> /usr/lib/ruby/locales/en.yml> (I18n::InvalidLocaleData)
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:181:in `load_yml'
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:165:in `load_file'
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:15:in `block in
> load_translations'
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:15:in `each'
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/base.rb:15:in
> `load_translations'
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/simple.rb:57:in
> `init_translations'
>  from /usr/lib/ruby/vendor_ruby/i18n/backend/simple.rb:40:in
> `available_locales'
>  from /usr/lib/ruby/vendor_ruby/i18n/config.rb:43:in `available_locales'
>  from /usr/lib/ruby/vendor_ruby/i18n/config.rb:49:in `available_locales_set'
>  from /usr/lib/ruby/vendor_ruby/i18n.rb:278:in `locale_available?'
>  from /usr/lib/ruby/vendor_ruby/i18n.rb:284:in `enforce_available_locales!'
>  from /usr/lib/ruby/vendor_ruby/i18n.rb:151:in `translate'
>  from /usr/lib/ruby/vendor_ruby/vagrant/errors.rb:103:in `translate_error'
>  from /usr/lib/ruby/vendor_ruby/vagrant/errors.rb:72:in `initialize'
>  from /usr/lib/ruby/vendor_ruby/vagrant-mutate/qemu.rb:8:in `exception'
>  from /usr/lib/ruby/vendor_ruby/vagrant-mutate/qemu.rb:8:in `fail'
>  from /usr/lib/ruby/vendor_ruby/vagrant-mutate/qemu.rb:8:in
> `verify_qemu_installed'
>  from /usr/lib/ruby/vendor_ruby/vagrant-mutate/mutate.rb:40:in `execute'
>  from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:42:in `execute'
>  from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:268:in `cli'
>  from /usr/bin/vagrant:173:in `<main>'

Unfortunately that is not something that should be fixed in
dh_vagrant_plugin since it does not handle installation of the plugin
code at all.

The correct fix for that is to use the Rubygems layout, as I have done
done for a few plugins lately:

https://anonscm.debian.org/cgit/pkg-ruby-extras/vagrant-libvirt.git/commit/?id=490f83cfc0469c924d4bc6f1448ea36786bcd30c
https://anonscm.debian.org/cgit/pkg-ruby-extras/vagrant-lxc.git/commit/?id=4806e31c52df2452d8b31c04fa401e78c9e630ce
https://anonscm.debian.org/cgit/pkg-ruby-extras/vagrant-mutate.git/commit/?id=02d8ccd218fe4e11baad8cfcdc69a2845fa5ff79
https://anonscm.debian.org/cgit/pkg-ruby-extras/vagrant-sshfs.git/commit/?id=58b5a0367df8c4735a3e99e8245e49521a4bc33c

So I am closing this bug, but will improve the documentation on this in
the vagrant package.

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to