vagrant-vbguest 0.22.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd46d6d0e7bfff66a287572bbe41c9c20375a03b14c0a70122670935bd87c1b4
4
- data.tar.gz: 67f4ad8b493ac4a16d45df782e7ab4785e9092444911a3a78f356a8a87ec47cd
3
+ metadata.gz: da79bc0ea1de83aaff4441411b30ccdda0d2e340a4b9005ba3881f3e99663b46
4
+ data.tar.gz: c417bfc0b198f54de1c1c310ebcc4cbadd0a1cd81547a45de0e959ff3eac8126
5
5
  SHA512:
6
- metadata.gz: 1e41145e1eacf6aaad2d4bf17e506b408ef2be2d1f1cb3ed66b5c4a77654e69bebf5f1d99204b81c80b2b15ca5fd4c9372dbd8b6e62c3fc0482582bc89cc3d19
7
- data.tar.gz: c1e19268ec2cab24a19ff5479dcfae3c4088673db2cb620d8b1c68a0db6f55cf95be170d6add8192db7c631b51eb795d9cb379c898f668ba107257dfce22d7f5
6
+ metadata.gz: 8470f53fcf0e23be79343e1a6660c94ea5fec4d731d90df5aced9f5e2f4de6791a3f99caf2872043280892e254def2d7003b125c2008c444a9852bc95d9ab3f5
7
+ data.tar.gz: 8591bff9dabf621cbc8ad3a6e92f6b3a0eaa25a8630a713085dd1f2ae21a5d06cf52993058af9cae3d5e186b75c88d3f1678a55d5ffb0a88d23f0cebcfe0843d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.22.0 (2019-12-06)
2
+
3
+ - Fix checking for `vboxadd` tools. [GH-362]
4
+
1
5
  ## 0.22.0 (2019-12-01)
2
6
 
3
7
  - Opensuse installer now uninstalls packaged guest additions
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.22.0
1
+ 0.22.1
@@ -104,16 +104,21 @@ module VagrantVbguest
104
104
  end
105
105
 
106
106
  def reboot_after_install?
107
- if (installer = guest_installer)
108
- installer.reboot_after_install?
109
- end
107
+ installer = guest_installer
108
+ raise NoInstallerFoundError, :method => 'check if we need to reboot after installing' if !installer
109
+ installer.reboot_after_install?
110
110
  end
111
111
 
112
- # Does the guest installer provide service tooling to manually start or rebuild guest additions?
113
- def has_service_tools?
114
- if (installer = guest_installer)
115
- installer.has_vboxadd_tools?
116
- end
112
+ def provides_vboxadd_tools?
113
+ installer = guest_installer
114
+ raise NoInstallerFoundError, :method => 'check platform support for vboxadd tools of' if !installer
115
+ installer.provides_vboxadd_tools?
116
+ end
117
+
118
+ def vboxadd_tools_available?
119
+ installer = guest_installer
120
+ raise NoInstallerFoundError, :method => 'check for existing vboxadd tools of' if !installer
121
+ installer.vboxadd_tools_available?
117
122
  end
118
123
 
119
124
  # Returns an installer instance for the current vm
@@ -125,15 +125,26 @@ module VagrantVbguest
125
125
  end
126
126
 
127
127
  # This manipulate the run-list of a the vbguest machine.
128
- def reboot_after_install?(opts=nil, &block)
128
+ #
129
+ # @return [Boolean]
130
+ def reboot_after_install?
129
131
  false
130
132
  end
131
133
 
132
134
  # Does the guest installer provide tooling to manually start or rebuild guest additions?
133
- def has_vboxadd_tools?(opts=nil, &block)
135
+ #
136
+ # @return [Boolean]
137
+ def provides_vboxadd_tools?
134
138
  false
135
139
  end
136
140
 
141
+ # Is the tooling to manually start or rebuild guest additions installed on the guest?
142
+ #
143
+ # @return [Boolean]
144
+ def vboxadd_tools_available?
145
+ raise NotImplementedError
146
+ end
147
+
137
148
  # Determinates the GuestAdditions version installed on the
138
149
  # guest system.
139
150
  #
@@ -135,7 +135,11 @@ module VagrantVbguest
135
135
  end
136
136
  end
137
137
 
138
- def has_service_tools?(opts=nil, &block)
138
+ def provides_vboxadd_tools?
139
+ true
140
+ end
141
+
142
+ def vboxadd_tools_available?
139
143
  !!find_tool('vboxadd') || communicate.test('systemctl list-units --type service | grep -q vboxadd', {:sudo => true})
140
144
  end
141
145
 
@@ -22,8 +22,11 @@ module VagrantVbguest
22
22
  @logger.debug("Runlist for state #{current_state} is: #{runlist}")
23
23
  while (command = runlist.shift)
24
24
  @logger.debug("Running command #{command} from runlist")
25
- if !self.send(command)
26
- env.ui.error('vagrant_vbguest.machine_loop_guard', :command => command, :state => current_state)
25
+ case self.send(command)
26
+ when nil # skipped
27
+ return false
28
+ when false # machine state change error
29
+ env.ui.error(I18n.t('vagrant_vbguest.machine_loop_guard', :command => command, :state => guest_additions_state.state))
27
30
  return false
28
31
  end
29
32
  return run if current_state != state
@@ -71,8 +74,8 @@ module VagrantVbguest
71
74
 
72
75
  return :clean if !guest_version
73
76
 
74
- # some sort of distro installation bot no `vboxadd` tools to trgger rebuilds or manual starts
75
- return :dirty if !installer.has_service_tools?
77
+ # some sort of distro installation bot no `vboxadd` tools to trigger rebuilds or manual starts
78
+ return :dirty if installer.provides_vboxadd_tools? && !installer.vboxadd_tools_available?
76
79
 
77
80
  if host_version != guest_version
78
81
  return :unmatched if host_version > guest_version || options[:allow_downgrade] || options[:force]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vbguest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.22.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Schulze
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-01 00:00:00.000000000 Z
11
+ date: 2019-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: micromachine