vanagon 0.18.0 → 0.20.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 +4 -4
- data/README.md +2 -2
- data/bin/build +3 -1
- data/bin/build_host_info +3 -1
- data/bin/build_requirements +3 -1
- data/bin/inspect +3 -1
- data/bin/render +3 -1
- data/bin/repo +3 -1
- data/bin/ship +3 -1
- data/bin/sign +3 -1
- data/lib/vanagon/cli.rb +4 -2
- data/lib/vanagon/cli/build.rb +2 -1
- data/lib/vanagon/cli/build_host_info.rb +3 -2
- data/lib/vanagon/cli/build_requirements.rb +4 -4
- data/lib/vanagon/cli/completion.rb +4 -3
- data/lib/vanagon/cli/inspect.rb +3 -2
- data/lib/vanagon/cli/list.rb +5 -6
- data/lib/vanagon/cli/render.rb +2 -1
- data/lib/vanagon/cli/ship.rb +4 -19
- data/lib/vanagon/cli/sign.rb +3 -2
- data/lib/vanagon/component.rb +13 -10
- data/lib/vanagon/component/dsl.rb +27 -20
- data/lib/vanagon/component/source.rb +2 -1
- data/lib/vanagon/component/source/git.rb +35 -10
- data/lib/vanagon/component/source/http.rb +3 -2
- data/lib/vanagon/component/source/local.rb +2 -1
- data/lib/vanagon/component/source/rewrite.rb +3 -2
- data/lib/vanagon/driver.rb +20 -21
- data/lib/vanagon/engine/always_be_scheduling.rb +12 -11
- data/lib/vanagon/engine/docker.rb +2 -1
- data/lib/vanagon/engine/ec2.rb +5 -4
- data/lib/vanagon/engine/hardware.rb +4 -3
- data/lib/vanagon/engine/pooler.rb +6 -5
- data/lib/vanagon/environment.rb +3 -2
- data/lib/vanagon/logger.rb +31 -0
- data/lib/vanagon/platform.rb +38 -5
- data/lib/vanagon/platform/dsl.rb +23 -6
- data/lib/vanagon/platform/windows.rb +3 -1
- data/lib/vanagon/project.rb +25 -15
- data/lib/vanagon/project/dsl.rb +6 -5
- data/lib/vanagon/utilities.rb +5 -4
- data/resources/deb/control.erb +1 -1
- data/resources/deb/postinst.erb +24 -13
- data/resources/deb/postrm.erb +9 -6
- data/resources/deb/prerm.erb +18 -8
- data/resources/osx/postinstall.erb +6 -2
- data/resources/rpm/project.spec.erb +12 -12
- data/resources/solaris/10/depend.erb +2 -2
- data/resources/solaris/10/postinstall.erb +11 -3
- data/resources/solaris/11/p5m.erb +2 -2
- data/spec/lib/vanagon/cli_spec.rb +1 -4
- data/spec/lib/vanagon/component/dsl_spec.rb +54 -10
- data/spec/lib/vanagon/component/source/git_spec.rb +4 -4
- data/spec/lib/vanagon/component_spec.rb +15 -2
- data/spec/lib/vanagon/engine/always_be_scheduling_spec.rb +4 -4
- data/spec/lib/vanagon/platform_spec.rb +80 -0
- data/spec/lib/vanagon/utilities_spec.rb +4 -1
- metadata +32 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8143e33ee3e55783135b3feff210b3b0a9cc84f78ef424b3ea64bc3fb9e2015d
|
4
|
+
data.tar.gz: 27cb820cfefca81d8eba73bcb050ed70fc01971b69ce104ac4eb2db83e79fb93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dc62ebe1401f4552390faa8fd53373d9fb124c571714f297665f009497af7684a8dbebdff6833b28514a85b85507b7d764a896b38e79a3a58c7322ab8d3e7e5
|
7
|
+
data.tar.gz: '0895360b81bd25c4f95877df7514d1a5f1ff87a6e765ad244108c9646ce4fc2a93670a282aabcdc41e5c4881a281ac9739b3f4c1c5b1dee03f4e3c9ff5c98a1b'
|
data/README.md
CHANGED
@@ -197,8 +197,8 @@ Port of the system where redis is running. Defaults to *6379*.
|
|
197
197
|
##### `VANAGON_USE_MIRRORS`
|
198
198
|
Controls whether component sources are downloaded directly from upstream URLs
|
199
199
|
or from configured mirrors. Most Puppet projects using Vanagon default to
|
200
|
-
fetching components from internal mirrors. Set this variable to `n`
|
201
|
-
building outside of the Puppet private network to download directly from
|
200
|
+
fetching components from internal mirrors. Set this variable to `n` or `false`
|
201
|
+
when building outside of the Puppet private network to download directly from
|
202
202
|
upstream sources.
|
203
203
|
|
204
204
|
##### `VANAGON_RETRY_COUNT`
|
data/bin/build
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/bin/build_host_info
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/bin/build_requirements
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/bin/inspect
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/bin/render
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/bin/repo
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
ENV["PROJECT_ROOT"] = Dir.pwd
|
4
6
|
|
5
7
|
# Begin warning: This ship script is an internal tool.
|
@@ -21,7 +23,7 @@ when 'rpm'
|
|
21
23
|
when 'deb'
|
22
24
|
Pkg::Util::RakeUtils.invoke_task('pl:jenkins:deb_repos')
|
23
25
|
when 'none'
|
24
|
-
|
26
|
+
VanagonLogger.warn "Skipping repo generation since repo target is set to 'none'"
|
25
27
|
else
|
26
28
|
Pkg::Util::RakeUtils.invoke_task('pl:jenkins:rpm_repos')
|
27
29
|
Pkg::Util::RakeUtils.invoke_task('pl:jenkins:deb_repos')
|
data/bin/ship
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/bin/sign
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'vanagon/logger'
|
4
|
+
|
3
5
|
script = File.basename($0)
|
4
6
|
|
5
|
-
|
7
|
+
VanagonLogger.info "#{script}: Warning: use of stand alone '#{script}' command is deprecated and may be removed.
|
6
8
|
Use: 'vanagon #{script}' instead."
|
7
9
|
|
8
10
|
exec "vanagon", script, *ARGV
|
data/lib/vanagon/cli.rb
CHANGED
@@ -15,6 +15,8 @@ require 'vanagon/cli/render'
|
|
15
15
|
require 'vanagon/cli/ship'
|
16
16
|
require 'vanagon/cli/sign'
|
17
17
|
|
18
|
+
require 'vanagon/logger'
|
19
|
+
|
18
20
|
|
19
21
|
class Vanagon
|
20
22
|
class InvalidArgument < StandardError
|
@@ -66,7 +68,7 @@ class Vanagon
|
|
66
68
|
puts DOCUMENTATION
|
67
69
|
exit 0
|
68
70
|
else
|
69
|
-
|
71
|
+
VanagonLogger.error "vanagon: Error: unknown command: \"#{sub_command}\"\n\n#{DOCUMENTATION}"
|
70
72
|
exit 1
|
71
73
|
end
|
72
74
|
|
@@ -95,7 +97,7 @@ class Vanagon
|
|
95
97
|
def parse_options(argv)
|
96
98
|
Docopt.docopt(DOCUMENTATION, { argv: argv, options_first: true })
|
97
99
|
rescue Docopt::Exit => e
|
98
|
-
|
100
|
+
VanagonLogger.error e.message
|
99
101
|
exit 1
|
100
102
|
end
|
101
103
|
end
|
data/lib/vanagon/cli/build.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'docopt'
|
2
|
+
require 'vanagon/logger'
|
2
3
|
|
3
4
|
class Vanagon
|
4
5
|
class CLI
|
@@ -32,7 +33,7 @@ class Vanagon
|
|
32
33
|
def parse(argv)
|
33
34
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
34
35
|
rescue Docopt::Exit => e
|
35
|
-
|
36
|
+
VanagonLogger.error e.message
|
36
37
|
exit 1
|
37
38
|
end
|
38
39
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'docopt'
|
2
|
+
require 'vanagon/logger'
|
2
3
|
|
3
4
|
class Vanagon
|
4
5
|
class CLI
|
@@ -26,7 +27,7 @@ class Vanagon
|
|
26
27
|
def parse(argv)
|
27
28
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
28
29
|
rescue Docopt::Exit => e
|
29
|
-
|
30
|
+
VanagonLogger.error e.message
|
30
31
|
exit 1
|
31
32
|
end
|
32
33
|
|
@@ -36,7 +37,7 @@ class Vanagon
|
|
36
37
|
|
37
38
|
platforms.each do |platform|
|
38
39
|
driver = Vanagon::Driver.new(platform, project, options)
|
39
|
-
|
40
|
+
VanagonLogger.warn JSON.generate(driver.build_host_info)
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'docopt'
|
2
2
|
require 'json'
|
3
|
+
require 'vanagon/logger'
|
3
4
|
|
4
5
|
class Vanagon
|
5
6
|
class CLI
|
@@ -27,7 +28,7 @@ class Vanagon
|
|
27
28
|
def parse(argv)
|
28
29
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
29
30
|
rescue Docopt::Exit => e
|
30
|
-
|
31
|
+
VanagonLogger.error e.message
|
31
32
|
exit 1
|
32
33
|
end
|
33
34
|
|
@@ -47,9 +48,8 @@ class Vanagon
|
|
47
48
|
end
|
48
49
|
end
|
49
50
|
|
50
|
-
|
51
|
-
|
52
|
-
$stdout.puts JSON.pretty_generate(build_requirements.flatten.uniq.sort)
|
51
|
+
VanagonLogger.warn "**** External packages required to build #{project} on #{platform}: ***"
|
52
|
+
VanagonLogger.warn JSON.pretty_generate(build_requirements.flatten.uniq.sort)
|
53
53
|
end
|
54
54
|
|
55
55
|
def options_translate(docopt_options)
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'docopt'
|
2
|
+
require 'vanagon/logger'
|
2
3
|
|
3
4
|
class Vanagon
|
4
5
|
class CLI
|
@@ -15,7 +16,7 @@ class Vanagon
|
|
15
16
|
def parse(argv)
|
16
17
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
17
18
|
rescue Docopt::Exit => e
|
18
|
-
|
19
|
+
VanagonLogger.error e.message
|
19
20
|
exit 1
|
20
21
|
end
|
21
22
|
|
@@ -24,10 +25,10 @@ class Vanagon
|
|
24
25
|
completion_file = File.expand_path(File.join('..', '..', '..', '..', 'extras', 'completions', "vanagon.#{shell}"), __FILE__)
|
25
26
|
|
26
27
|
if File.exist?(completion_file)
|
27
|
-
|
28
|
+
VanagonLogger.warn completion_file
|
28
29
|
exit 0
|
29
30
|
else
|
30
|
-
|
31
|
+
VanagonLogger.error "Could not find completion file for '#{shell}': No such file #{completion_file}"
|
31
32
|
exit 1
|
32
33
|
end
|
33
34
|
end
|
data/lib/vanagon/cli/inspect.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'docopt'
|
2
2
|
require 'json'
|
3
|
+
require 'vanagon/logger'
|
3
4
|
|
4
5
|
class Vanagon
|
5
6
|
class CLI
|
@@ -30,7 +31,7 @@ class Vanagon
|
|
30
31
|
def parse(argv)
|
31
32
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
32
33
|
rescue Docopt::Exit => e
|
33
|
-
|
34
|
+
VanagonLogger.error e.message
|
34
35
|
exit 1
|
35
36
|
end
|
36
37
|
|
@@ -41,7 +42,7 @@ class Vanagon
|
|
41
42
|
platforms.each do |platform|
|
42
43
|
driver = Vanagon::Driver.new(platform, project, options)
|
43
44
|
components = driver.project.components.map(&:to_hash)
|
44
|
-
|
45
|
+
VanagonLogger.warn JSON.pretty_generate(components)
|
45
46
|
end
|
46
47
|
end
|
47
48
|
|
data/lib/vanagon/cli/list.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'docopt'
|
2
|
+
require 'vanagon/logger'
|
2
3
|
|
3
4
|
class Vanagon
|
4
5
|
class CLI
|
@@ -18,7 +19,7 @@ class Vanagon
|
|
18
19
|
def parse(argv)
|
19
20
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
20
21
|
rescue Docopt::Exit => e
|
21
|
-
|
22
|
+
VanagonLogger.error e.message
|
22
23
|
exit 1
|
23
24
|
end
|
24
25
|
|
@@ -31,7 +32,7 @@ class Vanagon
|
|
31
32
|
if Dir.exist?(File.join(options[:configdir], 'platforms')) == false ||
|
32
33
|
Dir.exist?(File.join(options[:configdir], 'projects')) == false
|
33
34
|
|
34
|
-
|
35
|
+
VanagonLogger.error "Path to #{File.join(options[:configdir], 'platforms')} or #{File.join(options[:configdir], 'projects')} not found."
|
35
36
|
exit 1
|
36
37
|
end
|
37
38
|
|
@@ -49,14 +50,12 @@ class Vanagon
|
|
49
50
|
end
|
50
51
|
|
51
52
|
if options[:projects]
|
52
|
-
puts "- Projects"
|
53
|
-
puts output(project_list, options[:use_spaces])
|
53
|
+
puts "- Projects", output(project_list, options[:use_spaces])
|
54
54
|
return
|
55
55
|
end
|
56
56
|
|
57
57
|
if options[:platforms]
|
58
|
-
puts "- Platforms"
|
59
|
-
puts output(platform_list, options[:use_spaces])
|
58
|
+
puts "- Platforms", output(platform_list, options[:use_spaces])
|
60
59
|
return
|
61
60
|
end
|
62
61
|
end
|
data/lib/vanagon/cli/render.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'docopt'
|
2
2
|
require 'json'
|
3
|
+
require 'vanagon/logger'
|
3
4
|
|
4
5
|
class Vanagon
|
5
6
|
class CLI
|
@@ -27,7 +28,7 @@ class Vanagon
|
|
27
28
|
def parse(argv)
|
28
29
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
29
30
|
rescue Docopt::Exit => e
|
30
|
-
|
31
|
+
VanagonLogger.error e.message
|
31
32
|
exit 1
|
32
33
|
end
|
33
34
|
|
data/lib/vanagon/cli/ship.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'docopt'
|
2
|
+
require 'vanagon/logger'
|
2
3
|
|
3
4
|
class Vanagon
|
4
5
|
class CLI
|
@@ -14,38 +15,22 @@ class Vanagon
|
|
14
15
|
def parse(argv)
|
15
16
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
16
17
|
rescue Docopt::Exit => e
|
17
|
-
|
18
|
+
VanagonLogger.error e.message
|
18
19
|
exit 1
|
19
20
|
end
|
20
21
|
|
21
22
|
def run(_)
|
22
23
|
ENV['PROJECT_ROOT'] = Dir.pwd
|
23
24
|
|
24
|
-
artifactory_warning = <<-DOC
|
25
|
-
Unable to ship packages to artifactory. Please make sure you are pointing to a
|
26
|
-
recent version of packaging in your Gemfile. Please also make sure you include
|
27
|
-
the artifactory gem in your Gemfile.
|
28
|
-
|
29
|
-
Examples:
|
30
|
-
gem 'packaging', :github => 'puppetlabs/packaging', branch: '1.0.x'
|
31
|
-
gem 'artifactory'
|
32
|
-
DOC
|
33
|
-
|
34
25
|
if Dir['output/**/*'].select { |entry| File.file?(entry) }.empty?
|
35
|
-
|
26
|
+
VanagonLogger.error 'vanagon: Error: No packages to ship in the "output" directory. Maybe build some first?'
|
36
27
|
exit 1
|
37
28
|
end
|
38
29
|
|
39
30
|
require 'packaging'
|
40
31
|
Pkg::Util::RakeUtils.load_packaging_tasks
|
41
32
|
Pkg::Util::RakeUtils.invoke_task('pl:jenkins:ship', 'artifacts', 'output')
|
42
|
-
|
43
|
-
Pkg::Util::RakeUtils.invoke_task('pl:jenkins:ship_to_artifactory', 'output')
|
44
|
-
rescue LoadError
|
45
|
-
warn artifactory_warning
|
46
|
-
rescue StandardError
|
47
|
-
warn artifactory_warning
|
48
|
-
end
|
33
|
+
Pkg::Util::RakeUtils.invoke_task('pl:jenkins:ship_to_artifactory', 'output')
|
49
34
|
end
|
50
35
|
end
|
51
36
|
end
|
data/lib/vanagon/cli/sign.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'docopt'
|
2
|
+
require 'vanagon/logger'
|
2
3
|
|
3
4
|
class Vanagon
|
4
5
|
class CLI
|
@@ -14,14 +15,14 @@ class Vanagon
|
|
14
15
|
def parse(argv)
|
15
16
|
Docopt.docopt(DOCUMENTATION, { argv: argv })
|
16
17
|
rescue Docopt::Exit => e
|
17
|
-
|
18
|
+
VanagonLogger.error e.message
|
18
19
|
exit 1
|
19
20
|
end
|
20
21
|
|
21
22
|
def run(_)
|
22
23
|
ENV['PROJECT_ROOT'] = Dir.pwd
|
23
24
|
if Dir['output/**/*'].select { |entry| File.file?(entry) }.empty?
|
24
|
-
|
25
|
+
VanagonLogger.error 'sign: Error: No packages to sign in the "output" directory. Maybe build some first?'
|
25
26
|
exit 1
|
26
27
|
end
|
27
28
|
|
data/lib/vanagon/component.rb
CHANGED
@@ -3,6 +3,8 @@ require 'vanagon/component/rules'
|
|
3
3
|
require 'vanagon/component/source'
|
4
4
|
require 'vanagon/component/source/rewrite'
|
5
5
|
|
6
|
+
require 'vanagon/logger'
|
7
|
+
|
6
8
|
class Vanagon
|
7
9
|
class Component
|
8
10
|
include Vanagon::Utilities
|
@@ -138,9 +140,9 @@ class Vanagon
|
|
138
140
|
dsl.instance_eval(File.read(compfile), compfile, 1)
|
139
141
|
dsl._component
|
140
142
|
rescue StandardError => e
|
141
|
-
|
142
|
-
|
143
|
-
|
143
|
+
VanagonLogger.error "Error loading project '#{name}' using '#{compfile}':"
|
144
|
+
VanagonLogger.error e
|
145
|
+
VanagonLogger.error e.backtrace.join("\n")
|
144
146
|
raise e
|
145
147
|
end
|
146
148
|
|
@@ -178,6 +180,7 @@ class Vanagon
|
|
178
180
|
@preremove_actions = []
|
179
181
|
@postremove_actions = []
|
180
182
|
@install_only = false
|
183
|
+
@service = []
|
181
184
|
end
|
182
185
|
|
183
186
|
# Adds the given file to the list of files and returns @files.
|
@@ -254,18 +257,18 @@ class Vanagon
|
|
254
257
|
def fetch_mirrors(options)
|
255
258
|
mirrors.to_a.shuffle.each do |mirror|
|
256
259
|
begin
|
257
|
-
|
260
|
+
VanagonLogger.info %(Attempting to fetch from mirror URL "#{mirror}")
|
258
261
|
@source = Vanagon::Component::Source.source(mirror, options)
|
259
262
|
return true if source.fetch
|
260
263
|
rescue SocketError
|
261
264
|
# SocketError means that there was no DNS/name resolution
|
262
265
|
# for whatever remote protocol the mirror tried to use.
|
263
|
-
|
266
|
+
VanagonLogger.error %(Unable to resolve mirror URL "#{mirror}")
|
264
267
|
rescue RuntimeError
|
265
268
|
# Source retrieval does not consistently return a meaningful
|
266
269
|
# namespaced error message, which means we're brute-force rescuing
|
267
270
|
# RuntimeError. Not a good look, and we should fix this.
|
268
|
-
|
271
|
+
VanagonLogger.error %(Unable to retrieve mirror URL "#{mirror}")
|
269
272
|
end
|
270
273
|
end
|
271
274
|
false
|
@@ -277,7 +280,7 @@ class Vanagon
|
|
277
280
|
# @return [Boolean] return True if the source can be retrieved,
|
278
281
|
# or False otherwise
|
279
282
|
def fetch_url(options)
|
280
|
-
|
283
|
+
VanagonLogger.info %(Attempting to fetch from canonical URL "#{url}")
|
281
284
|
@source = Vanagon::Component::Source.source(url, options)
|
282
285
|
# Explicitly coerce the return value of #source.fetch,
|
283
286
|
# because each subclass of Vanagon::Component::Source returns
|
@@ -303,7 +306,7 @@ class Vanagon
|
|
303
306
|
def get_source(workdir) # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
|
304
307
|
opts = options.merge({ workdir: workdir })
|
305
308
|
if url || !mirrors.empty?
|
306
|
-
if ENV['VANAGON_USE_MIRRORS'] == 'n'
|
309
|
+
if ENV['VANAGON_USE_MIRRORS'] == 'n' or ENV['VANAGON_USE_MIRRORS'] == 'false'
|
307
310
|
fetch_url(opts)
|
308
311
|
else
|
309
312
|
fetch_mirrors(opts) || fetch_url(opts)
|
@@ -319,7 +322,7 @@ class Vanagon
|
|
319
322
|
@version ||= source.version
|
320
323
|
end
|
321
324
|
else
|
322
|
-
|
325
|
+
VanagonLogger.info "No source given for component '#{@name}'"
|
323
326
|
|
324
327
|
# If there is no source, we don't want to try to change directories, so we just change to the current directory.
|
325
328
|
@dirname = './'
|
@@ -407,7 +410,7 @@ class Vanagon
|
|
407
410
|
# @return [String] environment suitable for inclusion in a Makefile
|
408
411
|
# @deprecated
|
409
412
|
def get_environment
|
410
|
-
|
413
|
+
VanagonLogger.info <<-WARNING.undent
|
411
414
|
#get_environment is deprecated; environment variables have been moved
|
412
415
|
into the Makefile, and should not be used within a Makefile's recipe.
|
413
416
|
The #get_environment method will be removed by Vanagon 1.0.0.
|