Hi,

I'm noticing that if I have a set of plugins installed that any subsequent 
plugin install will trigger reinstalling of all of the existing plugins 
even if there has been no changes to the versions of the plugins installed 
or their dependencies.

Is this intentional or unexpected?

When I enable debug output I see a dependency list of gems for 
installation, a report on activating a solution set, followed by removal of 
activation request from install as already installed for specific gems, 
which appears to only include the gems bundled with vagrant, it doesn't 
include any of the dependencies that appear under the user global 
~/.vagrant.d/gems/<ruby-version>/gems/

The reason this is of interest is that due to library conflicts between 
distros and the released package via https://www.vagrantup.com/downloads, 
that appear for gems with native extensions. Possibly doesn't impact many, 
but it's definitely been an issue for vagrant-libvirt. Hence I've been 
looking at providing a docker based image containing vagrant + 
vagrant-libvirt using a distro release that is known working.

The behaviour of reinstalling the plugins every time impacts the ability 
for people to extend the image. Potentially this is less of an issue with 
the support for installing plugins locally to a project, but for teams 
wanting to provide an pre-build docker image for CI or to ensure 
consistency across multiple projects to provide the same versions for all 
team members it can be an issue. Additionally installing vagrant-libvirt 
locally isn't much good if it's simply not possible due to library 
conflicts between what the embedded ruby was build against versus what the 
libvirt library was compiled against, and thus preventing ruby-libvirt from 
either building, or subsequently loading.

The reason I spotted this was, I was installing a plugin that I thought was 
pure ruby and yet I saw the lines about native extensions appearing in the 
output:
Building native extensions. This could take a while...
Building native extensions. This could take a while...

Digging deeper I noticed that all of the gems under the global config 
directory for the current vagrant install were getting updated timestamps 
even though all except the one I'd requested to install had already been 
present due to being dependencies of vagrant-libvirt

Added a public gist containing the output 
https://gist.github.com/electrofelix/ccfeab3133b4af799049d93c986e1890

It looks like it goes through the process of detecting all of the 
dependencies, but only recognizing those bundled with the ruby install 
under /opt/vagrant/embedded/lib/ruby/2.6.0/ and 
/opt/vagrant/embedded/lib/ruby/gems/2.6.0/gems/, along with the ones needed 
by vagrant itself under /opt/vagrant/embedded/gems/2.2.13/gems/ as already 
installed, ignoring the any under ~/.vagrant.d/gems/2.6.6/gems/, which are 
the following gems:
fog-core-2.2.3
fog-json-1.2.0
fog-libvirt-0.8.0
fog-xml-0.1.3
formatador-0.2.5
nokogiri-1.11.2-x86_64-linux
racc-1.5.2
ruby-libvirt-0.7.1
tzinfo-2.0.4
tzinfo-data-1.2021.1
vagrant-guests-clearlinux-1.2.4
vagrant-libvirt-0.4.0
vagrant-proxyconf-2.0.10
vagrant-winrm-syncedfolders-1.0.1

With the last 4 being the plugins installed, and the preceding ones being 
any dependencies.

Regards,
Darragh

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/vagrant/issues
Discuss: https://discuss.hashicorp.com/c/vagrant/24
--- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vagrant-up/feda7451-1bb8-4978-be92-c6a2805d7ee8n%40googlegroups.com.

Reply via email to