vagrant-mutate 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -1
- data/lib/vagrant-mutate/converter/converter.rb +5 -1
- data/lib/vagrant-mutate/qemu.rb +15 -11
- data/lib/vagrant-mutate/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d61d3a19b58fbf87b0c6dea226cceab60232c299
|
4
|
+
data.tar.gz: 8af3f8b241f7d525981d7682db1790f866596c3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae8e9f694743c23db4c9703575fdae3401976f0482fbc11f34004995eca212b8ab8493d5fa8784ec2783695930ad0ebf5df88adba775bddbcb411840569a5f87
|
7
|
+
data.tar.gz: d4f9c7b7cdccb175da5c729853dab37806255972cf356990c355146cc8999e30da1fa1a3ccd1ef9397fa0e429cc9c8f3a38d415944f1432a45b24f2644c571af
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -93,8 +93,12 @@ module VagrantMutate
|
|
93
93
|
# p for progress bar
|
94
94
|
# S for sparse file
|
95
95
|
qemu_options = '-p -S 16k'
|
96
|
+
qemu_version = Qemu.qemu_version()
|
97
|
+
if qemu_version >= Gem::Version.new('1.1.0')
|
98
|
+
qemu_options += ' -o compat=1.1'
|
99
|
+
end
|
96
100
|
|
97
|
-
command = "qemu-img convert #{qemu_options} -O #{output_format}
|
101
|
+
command = "qemu-img convert #{qemu_options} -O #{output_format} #{input_file} #{output_file}"
|
98
102
|
@logger.info "Running #{command}"
|
99
103
|
unless system(command)
|
100
104
|
fail Errors::WriteDiskFailed, error_message: "qemu-img exited with status #{$CHILD_STATUS.exitstatus}"
|
data/lib/vagrant-mutate/qemu.rb
CHANGED
@@ -17,22 +17,26 @@ module VagrantMutate
|
|
17
17
|
fail Errors::QemuImgNotFound
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.
|
20
|
+
def self.qemu_version()
|
21
21
|
usage = `qemu-img --version`
|
22
22
|
if usage =~ /(\d+\.\d+\.\d+)/
|
23
|
-
|
24
|
-
# less than 1.2 or equal to 1.6.x
|
25
|
-
if installed_version < Gem::Version.new('1.2.0') or (installed_version >= Gem::Version.new('1.6.0') and installed_version < Gem::Version.new('1.7.0'))
|
26
|
-
|
27
|
-
env.ui.warn "You have qemu #{installed_version} installed. "\
|
28
|
-
'This version cannot read some virtualbox boxes. '\
|
29
|
-
'If conversion fails, see below for recommendations. '\
|
30
|
-
'https://github.com/sciurus/vagrant-mutate/wiki/QEMU-Version-Compatibility'
|
31
|
-
|
32
|
-
end
|
23
|
+
return Gem::Version.new(Regexp.last_match[1])
|
33
24
|
else
|
34
25
|
fail Errors::ParseQemuVersionFailed
|
35
26
|
end
|
36
27
|
end
|
28
|
+
|
29
|
+
def self.verify_qemu_version(env)
|
30
|
+
installed_version = qemu_version()
|
31
|
+
# less than 1.2 or equal to 1.6.x
|
32
|
+
if installed_version < Gem::Version.new('1.2.0') or (installed_version >= Gem::Version.new('1.6.0') and installed_version < Gem::Version.new('1.7.0'))
|
33
|
+
|
34
|
+
env.ui.warn "You have qemu #{installed_version} installed. "\
|
35
|
+
'This version cannot read some virtualbox boxes. '\
|
36
|
+
'If conversion fails, see below for recommendations. '\
|
37
|
+
'https://github.com/sciurus/vagrant-mutate/wiki/QEMU-Version-Compatibility'
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
37
41
|
end
|
38
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-mutate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Pitts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|