78 Commits

Author SHA1 Message Date
Chris Roberts
3daf3e532d Update ordering of gem sources to ensure proper resolution
In recent Rubies the first dependency to satisfy the constraint will
be used regardless if higher versions are available in subsequent
sources. Move custom source to start of list when resolving plugins
to provide desired behavior.
2018-11-02 09:14:27 -07:00
Chris Roberts
3223737734 Use env_local consistently internally 2018-07-17 14:49:41 -07:00
Chris Roberts
b71054502e Update local usage to env_local for clarity 2018-07-17 14:49:41 -07:00
Chris Roberts
40f4e6f67e Vagrant Environment isolated plugins
Adds support for plugins isolated to a specific `Vagrant::Environment`
which can be managed by the vagrant plugin command using the the
--local flag.
2018-07-17 14:49:41 -07:00
Chris Roberts
91018d4edc Remove existing items from request set prior to installation 2018-05-08 13:52:23 -07:00
Josh Soref
1a5ddea9f4 Spelling fixes
* account
* addresses
* administrator
* afterwards
* because
* bridgeable
* capabilities
* capability
* checksum
* configuration
* configuration for
* configure
* criteria
* delimited
* delivered
* derivatives
* description
* detect
* directory
* display
* downloading
* during
* electric
* enabling
* encountered
* equivalent
* executable
* executed
* hashicorp
* hypervisor
* hyphens
* implementation
* incorporate
* inheritance
* initialize
* instance
* instead
* interactions
* invocable
* machine
* maximum
* message
* mounting
* overridden
* overwrite
* paramiko
* preparing
* provides
* provisioning
* recursively
* requested
* resetting
* retryable
* running
* satisfied
* searching
* sometimes
* specified
* successfully
* synced folders
* unauthorized
* underlying
* userprofile
* vagrant
* vagrantfile
* variable
* various
* version
* virtual
* windows
2018-03-14 14:41:04 +00:00
Chris Roberts
f42279508d Reset plugin constraint on update if explicit version set 2017-06-28 07:24:32 -07:00
Chris Roberts
73d85bd2f7 Support strict enforcement of internal dependency constraints 2017-06-27 19:20:20 -07:00
Chris Roberts
85d5f11f62 Adjustments to handle plugin updates using proper constraints
If a user provides the gem version using an explicit version or a
constraint, the update action should honor that constraint and not
simply replace it with an unbound constraint.

This also removes system plugin specifications from being matched
and preferred which prevents updates and can result in unexpected
downgrades when running the update.
2017-06-27 19:05:30 -07:00
Chris Roberts
6aafe3255a Force wrappers to be generated to prevent invalid version parsing 2017-04-06 16:52:10 -07:00
Chris Roberts
df069deac0 Validate plugin sources and report errors if detected. 2017-04-04 17:53:04 -07:00
Chris Roberts
354c1c2b51 Prevent adding local paths to RubyGems sources list 2017-03-22 16:36:42 -07:00
Chris Roberts
9d1ec938ef Merge pull request #8341 from chrisroberts/enhancement/prerelease
Support spec prerelease matching
2017-03-07 15:02:17 -08:00
Chris Roberts
7610ecfcba Allow prerelease matches on vagrant spec when running instance is prerelease 2017-03-07 10:36:35 -08:00
Chris Roberts
96204383c7 Force path as preferred source on local install 2017-03-03 09:12:44 -08:00
Chris Roberts
86af6501ed Remove installer set push from default source push 2017-02-24 08:02:22 -08:00
Chris Roberts
70cacb27fa Prefer given source if available when installing plugin 2017-02-09 17:22:48 -08:00
Michael Brandt
be63ace50f Add gem_version to plugin_info for local installs 2017-02-02 17:58:29 -07:00
Chris Roberts
df00edf1a7 Set base directory to parent directory within plugin specs
This adjustment allows for extensions to be properly discovered after
plugin gem specifications have been activated.
2017-01-06 12:55:13 -08:00
Chris Roberts
c8d564e578 Prevent interaction when removing plugin gems 2016-12-06 07:07:52 -08:00
Chris Roberts
5b1b18d01a Merge pull request #8068 from chrisroberts/bundler/install-solution-act
Detect load failure within solution set and retry if found
2016-12-05 13:28:58 -08:00
Chris Roberts
3dccd82a39 Explicitly require name_tuple
This does not get automatically loaded before usage so ensure
it is properly loaded for plugin usage.
2016-12-05 09:35:02 -08:00
Chris Roberts
ce35611c34 Detect load failure within solution set and retry if found
Installation solution sets in 2.2.5 can end up out of order (not seen
in 2.3.1) causing LoadErrors when the specification is in the solution
set during validation. This detects the missing spec within the solution
and if found will move spec to the start of the solution set and retry
solution activation.
2016-12-01 08:15:04 -08:00
Chris Roberts
f1e623976b Do not include default specifications within dependencies 2016-11-28 16:54:59 -08:00
Chris Roberts
2cc4b82198 Only read default specifications directory when within bundler context 2016-11-22 08:26:43 -08:00
Chris Roberts
a51949933f Always apply builtin constraints within dependency restrictions
Include detection of running context (within Bundler or not) and
load the "buitin" gems based on that context.
2016-11-22 07:53:19 -08:00
Chris Roberts
53b9f1747c Allow plugin_init_error to provide all information. Include final reset on specifications. 2016-11-17 16:40:51 -08:00
Chris Roberts
818f7acb7b Provide better internal consistency of installed plugin gems.
Refactors reusable actions into isolated methods. Supports installation/removal
without activation to prevent unintended conflicts during upgrades and cleanup.
Introduced custom resolver set to handle multiple installed versions of gems
which enables proper cleanup.
2016-11-16 13:26:13 -08:00
Chris Roberts
e2d96f942f Provide nice error output when plugin initialization fails
Include extra logging during initialization to display error if encountered
and solution set prior to performing activations.
2016-11-15 15:50:39 -08:00
Chris Roberts
3edd0b57e9 Add debug logging output to Bundler implementation 2016-11-11 15:08:59 -08:00
Chris Roberts
bd3f0c442c Only use Gem sources that are provided 2016-11-11 14:50:20 -08:00
Chris Roberts
1691e3af58 Only install from defined sources unless install is local 2016-11-11 14:44:14 -08:00
Chris Roberts
d8455c0a9a Add custom sources if not included 2016-11-11 14:33:26 -08:00
Chris Roberts
6e40d46c50 Fix up local gem plugin installation when not published remotely 2016-11-11 14:25:03 -08:00
Chris Roberts
3fb5913af1 Update .init! to attempt repair if instructed 2016-11-07 18:48:51 -08:00
Chris Roberts
1fb4553d14 [core] Remove bundler usage for plugin management 2016-11-07 18:48:51 -08:00
Seth Vargo
05aafedc6d
core/bundler: Reset specs in a way that works with new Rubygems 2016-06-20 15:19:21 -07:00
Karl Isenberg
f084fc7d78 Revert 3f9fb2ef03a78bc9177a52d4629a5e80e6e42b2e from GH-2769
- For compatibility with ba77d4b533e449fa610531a7832b8fd1837eb9db

Fixes GH-7073
2016-05-31 14:52:43 -07:00
Seth Vargo
159e1ec1f1
Use a real file for bundler 2016-05-29 00:41:59 -04:00
Seth Vargo
3d2390fc94
Give a unique, prefixed name to all tempfiles
This commit basically grepped the code base for all uses of Dir.mktmpdir
and Tempfile.new/open and ensures the value is unique within the
code base and also prefixed with `vagrant-`.

Previously, most invocations of these commands simply used "vagrant",
thus making them indistinguishable when trying to identify leaks.
2016-05-28 23:22:34 -04:00
Seth Vargo
cee6e6c7bc
Fix file leaking in bundler 2016-05-28 17:01:59 -04:00
Christian Hofstaedtler
ba77d4b533
Allow Vagrant to work with newer Rubygems
Fixes GH-7073
2016-05-27 17:19:33 -04:00
Mitchell Hashimoto
0de44a116b core: use env var for bundle retries [GH-6705] 2015-12-24 12:16:12 -08:00
Timur Alperovich
5b910c186c Fix the resolution of SafeEnv.
Recent change broke bundler.rb due to incorrect scope resolution (the
error is: uninitialized constant Vagrant::Bundler::SafeEnv
(NameError).
2015-11-24 12:18:50 -08:00
Mitchell Hashimoto
1405395d81 core: catch EINVAL on setting env vars [GH-6017] 2015-11-23 09:39:51 -08:00
Mitchell Hashimoto
2ade66443e core: retry bundler network calls a few times [GH-6097] 2015-11-19 23:57:16 -08:00
Rob Kinyon
14b84a4a76 Added a --plugin-clean-sources parameter that will allow for
only those sources that are defined by the user to be used.
2014-10-28 21:53:41 -04:00
Mitchell Hashimoto
023ed006bf core: better bundler errors 2014-08-29 08:20:21 -07:00
Mitchell Hashimoto
04835ae612 core: clean up Bundler tempfiles [GH-4103] 2014-08-08 16:48:53 -07:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00