autoproj 2.14.0 → 2.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +25 -0
  3. data/.github/workflows/test.yml +30 -0
  4. data/.rubocop.yml +79 -91
  5. data/.rubocop_todo.yml +1473 -0
  6. data/Gemfile +9 -9
  7. data/Rakefile +24 -24
  8. data/autoproj.gemspec +22 -22
  9. data/bin/alocate +4 -4
  10. data/bin/alog +5 -7
  11. data/bin/amake +4 -4
  12. data/bin/aup +4 -4
  13. data/bin/autoproj +3 -3
  14. data/bin/autoproj_bootstrap +185 -182
  15. data/bin/autoproj_bootstrap.in +7 -8
  16. data/bin/autoproj_install +184 -181
  17. data/bin/autoproj_install.in +6 -7
  18. data/lib/autoproj/aruba_minitest.rb +6 -11
  19. data/lib/autoproj/autobuild.rb +5 -6
  20. data/lib/autoproj/autobuild_extensions/archive_importer.rb +10 -11
  21. data/lib/autoproj/autobuild_extensions/dsl.rb +38 -34
  22. data/lib/autoproj/autobuild_extensions/git.rb +27 -26
  23. data/lib/autoproj/autobuild_extensions/package.rb +23 -22
  24. data/lib/autoproj/autobuild_extensions/svn.rb +1 -2
  25. data/lib/autoproj/base.rb +1 -1
  26. data/lib/autoproj/bash_completion.rb +5 -6
  27. data/lib/autoproj/build_option.rb +22 -24
  28. data/lib/autoproj/cli/base.rb +26 -26
  29. data/lib/autoproj/cli/bootstrap.rb +14 -16
  30. data/lib/autoproj/cli/build.rb +10 -7
  31. data/lib/autoproj/cli/cache.rb +11 -11
  32. data/lib/autoproj/cli/clean.rb +10 -10
  33. data/lib/autoproj/cli/commit.rb +7 -8
  34. data/lib/autoproj/cli/doc.rb +2 -2
  35. data/lib/autoproj/cli/envsh.rb +1 -2
  36. data/lib/autoproj/cli/exec.rb +60 -20
  37. data/lib/autoproj/cli/inspection_tool.rb +13 -7
  38. data/lib/autoproj/cli/locate.rb +30 -41
  39. data/lib/autoproj/cli/log.rb +7 -7
  40. data/lib/autoproj/cli/main.rb +213 -204
  41. data/lib/autoproj/cli/main_doc.rb +22 -21
  42. data/lib/autoproj/cli/main_global.rb +44 -19
  43. data/lib/autoproj/cli/main_plugin.rb +18 -18
  44. data/lib/autoproj/cli/main_test.rb +28 -27
  45. data/lib/autoproj/cli/manifest.rb +7 -7
  46. data/lib/autoproj/cli/osdeps.rb +12 -11
  47. data/lib/autoproj/cli/patcher.rb +2 -3
  48. data/lib/autoproj/cli/query.rb +17 -18
  49. data/lib/autoproj/cli/reconfigure.rb +1 -2
  50. data/lib/autoproj/cli/reset.rb +9 -12
  51. data/lib/autoproj/cli/show.rb +38 -39
  52. data/lib/autoproj/cli/status.rb +45 -39
  53. data/lib/autoproj/cli/switch_config.rb +5 -6
  54. data/lib/autoproj/cli/tag.rb +12 -11
  55. data/lib/autoproj/cli/test.rb +7 -7
  56. data/lib/autoproj/cli/update.rb +35 -37
  57. data/lib/autoproj/cli/utility.rb +11 -10
  58. data/lib/autoproj/cli/version.rb +42 -40
  59. data/lib/autoproj/cli/versions.rb +14 -15
  60. data/lib/autoproj/cli/watch.rb +33 -37
  61. data/lib/autoproj/cli/which.rb +16 -20
  62. data/lib/autoproj/cli.rb +4 -2
  63. data/lib/autoproj/configuration.rb +77 -84
  64. data/lib/autoproj/environment.rb +28 -13
  65. data/lib/autoproj/exceptions.rb +9 -3
  66. data/lib/autoproj/find_workspace.rb +20 -25
  67. data/lib/autoproj/git_server_configuration.rb +40 -44
  68. data/lib/autoproj/gitorious.rb +1 -1
  69. data/lib/autoproj/installation_manifest.rb +64 -29
  70. data/lib/autoproj/local_package_set.rb +13 -11
  71. data/lib/autoproj/manifest.rb +132 -130
  72. data/lib/autoproj/metapackage.rb +2 -6
  73. data/lib/autoproj/ops/atomic_write.rb +7 -6
  74. data/lib/autoproj/ops/build.rb +4 -6
  75. data/lib/autoproj/ops/cache.rb +41 -43
  76. data/lib/autoproj/ops/cached_env.rb +5 -4
  77. data/lib/autoproj/ops/configuration.rb +511 -506
  78. data/lib/autoproj/ops/import.rb +73 -63
  79. data/lib/autoproj/ops/install.rb +178 -174
  80. data/lib/autoproj/ops/loader.rb +77 -76
  81. data/lib/autoproj/ops/main_config_switcher.rb +36 -45
  82. data/lib/autoproj/ops/phase_reporting.rb +4 -4
  83. data/lib/autoproj/ops/snapshot.rb +250 -247
  84. data/lib/autoproj/ops/tools.rb +76 -78
  85. data/lib/autoproj/ops/watch.rb +6 -6
  86. data/lib/autoproj/ops/which.rb +17 -14
  87. data/lib/autoproj/options.rb +13 -2
  88. data/lib/autoproj/os_package_installer.rb +102 -92
  89. data/lib/autoproj/os_package_query.rb +7 -13
  90. data/lib/autoproj/os_package_resolver.rb +189 -140
  91. data/lib/autoproj/os_repository_installer.rb +4 -4
  92. data/lib/autoproj/os_repository_resolver.rb +8 -6
  93. data/lib/autoproj/package_definition.rb +12 -13
  94. data/lib/autoproj/package_managers/apt_dpkg_manager.rb +10 -10
  95. data/lib/autoproj/package_managers/bundler_manager.rb +147 -111
  96. data/lib/autoproj/package_managers/debian_version.rb +25 -21
  97. data/lib/autoproj/package_managers/emerge_manager.rb +2 -3
  98. data/lib/autoproj/package_managers/gem_manager.rb +68 -77
  99. data/lib/autoproj/package_managers/homebrew_manager.rb +3 -4
  100. data/lib/autoproj/package_managers/manager.rb +8 -3
  101. data/lib/autoproj/package_managers/pacman_manager.rb +2 -3
  102. data/lib/autoproj/package_managers/pip_manager.rb +20 -22
  103. data/lib/autoproj/package_managers/pkg_manager.rb +3 -4
  104. data/lib/autoproj/package_managers/port_manager.rb +2 -3
  105. data/lib/autoproj/package_managers/shell_script_manager.rb +32 -22
  106. data/lib/autoproj/package_managers/unknown_os_manager.rb +5 -8
  107. data/lib/autoproj/package_managers/yum_manager.rb +12 -15
  108. data/lib/autoproj/package_managers/zypper_manager.rb +11 -14
  109. data/lib/autoproj/package_manifest.rb +27 -26
  110. data/lib/autoproj/package_selection.rb +187 -187
  111. data/lib/autoproj/package_set.rb +127 -113
  112. data/lib/autoproj/python.rb +55 -55
  113. data/lib/autoproj/query_base.rb +20 -14
  114. data/lib/autoproj/reporter.rb +19 -19
  115. data/lib/autoproj/repository_managers/apt.rb +101 -67
  116. data/lib/autoproj/repository_managers/unknown_os_manager.rb +3 -3
  117. data/lib/autoproj/shell_completion.rb +16 -13
  118. data/lib/autoproj/source_package_query.rb +29 -36
  119. data/lib/autoproj/system.rb +32 -21
  120. data/lib/autoproj/test.rb +127 -104
  121. data/lib/autoproj/variable_expansion.rb +7 -9
  122. data/lib/autoproj/vcs_definition.rb +35 -32
  123. data/lib/autoproj/version.rb +1 -1
  124. data/lib/autoproj/workspace.rb +123 -107
  125. data/lib/autoproj/zsh_completion.rb +8 -9
  126. data/lib/autoproj.rb +53 -55
  127. data/samples/autoproj/init.rb +1 -2
  128. metadata +53 -51
  129. data/.travis.yml +0 -24
@@ -1,5 +1,5 @@
1
- require 'open3'
2
- require 'rubygems'
1
+ require "open3"
2
+ require "rubygems"
3
3
 
4
4
  module Autoproj
5
5
  module Python
@@ -8,12 +8,12 @@ module Autoproj
8
8
  def self.get_python_version(python_bin)
9
9
  unless File.exist?(python_bin)
10
10
  raise ArgumentError, "Autoproj::Python.get_python_version executable "\
11
- "'#{python_bin}' does not exist"
11
+ "'#{python_bin}' does not exist"
12
12
  end
13
13
 
14
14
  cmd = "#{python_bin} -c \"import sys;"\
15
- "version=sys.version_info[:3]; "\
16
- "print('{0}.{1}'.format(*version))\"".strip
15
+ "version=sys.version_info[:3]; "\
16
+ "print('{0}.{1}'.format(*version))\"".strip
17
17
 
18
18
  msg, status = Open3.capture2e(cmd)
19
19
  if status.success?
@@ -21,14 +21,14 @@ module Autoproj
21
21
 
22
22
  else
23
23
  raise "Autoproj::Python.get_python_version identification"\
24
- " of python version for '#{python_bin}' failed: #{msg}"
24
+ " of python version for '#{python_bin}' failed: #{msg}"
25
25
  end
26
26
  end
27
27
 
28
28
  def self.get_pip_version(pip_bin)
29
29
  unless File.exist?(pip_bin)
30
30
  raise ArgumentError, "Autoproj::Python.get_pip_version executable "\
31
- "'#{pip_bin}' does not exist"
31
+ "'#{pip_bin}' does not exist"
32
32
  end
33
33
 
34
34
  cmd = "#{pip_bin} --version"
@@ -39,16 +39,16 @@ module Autoproj
39
39
 
40
40
  else
41
41
  raise "Autoproj::Python.get_pip_version identification"\
42
- " of pip version for '#{pip_bin}' failed: #{msg}"
42
+ " of pip version for '#{pip_bin}' failed: #{msg}"
43
43
  end
44
44
  end
45
45
 
46
46
  def self.validate_version(version, version_constraint)
47
- if !version_constraint
48
- true
49
- else
47
+ if version_constraint
50
48
  dependency = Gem::Dependency.new("python", version_constraint)
51
49
  dependency.match?("python", version)
50
+ else
51
+ true
52
52
  end
53
53
  end
54
54
 
@@ -66,9 +66,9 @@ module Autoproj
66
66
  # Find python given a version constraint
67
67
  # @return [String,String] path to python executable and python version
68
68
  def self.find_python(ws: Autoproj.workspace,
69
- version: ws.config.get('python_version', nil))
69
+ version: ws.config.get("python_version", nil))
70
70
  finders = [
71
- -> { Autobuild.programs['python'] },
71
+ -> { Autobuild.programs["python"] },
72
72
  -> { `which python3`.strip },
73
73
  -> { `which python`.strip }
74
74
  ]
@@ -81,7 +81,7 @@ module Autoproj
81
81
  end
82
82
  end
83
83
  raise "Autoproj::Python.find_python_bin: failed to find python" \
84
- " for version '#{version}'"
84
+ " for version '#{version}'"
85
85
  end
86
86
 
87
87
  # Get information about the python executable from autoproj config,
@@ -91,10 +91,10 @@ module Autoproj
91
91
  # are fulfilled nil otherwise
92
92
 
93
93
  def self.get_python_from_config(ws: Autoproj.workspace, version: nil)
94
- config_bin = ws.config.get('python_executable', nil)
94
+ config_bin = ws.config.get("python_executable", nil)
95
95
  return unless config_bin
96
96
 
97
- config_version = ws.config.get('python_version', nil)
97
+ config_version = ws.config.get("python_version", nil)
98
98
  config_version ||= get_python_version(config_bin)
99
99
 
100
100
  # If a version constraint is given, ensure fulfillment
@@ -102,25 +102,25 @@ module Autoproj
102
102
  [config_bin, config_version]
103
103
  else
104
104
  raise "python_executable in autoproj config with " \
105
- "version '#{config_version}' does not match "\
106
- "version constraints '#{version}'"
105
+ "version '#{config_version}' does not match "\
106
+ "version constraints '#{version}'"
107
107
  end
108
108
  end
109
109
 
110
110
  def self.custom_resolve_python(bin: nil,
111
- version: nil)
111
+ version: nil)
112
112
  version, valid = validate_python_version(bin, version)
113
113
  if valid
114
114
  [bin, version]
115
115
  else
116
116
  raise "Autoproj::Python.resolve_python: requested python"\
117
- "executable '#{bin}' does not satisfy version"\
118
- "constraints '#{version}'"
117
+ "executable '#{bin}' does not satisfy version"\
118
+ "constraints '#{version}'"
119
119
  end
120
120
  end
121
121
 
122
122
  def self.auto_resolve_python(ws: Autoproj.workspace,
123
- version: nil)
123
+ version: nil)
124
124
  version_constraint = version
125
125
  resolvers = [
126
126
  -> { get_python_from_config(ws: ws, version: version_constraint) },
@@ -129,15 +129,15 @@ module Autoproj
129
129
 
130
130
  bin = nil
131
131
  resolvers.each do |resolver|
132
- bin, version = resolver.call
133
- if bin && File.exist?(bin) && version
134
- Autoproj.debug "Autoproj::Python.resolve_python: " \
135
- "found python '#{bin}' version '#{version}'"
136
- break
137
- end
138
- rescue RuntimeError => e
132
+ bin, version = resolver.call
133
+ if bin && File.exist?(bin) && version
139
134
  Autoproj.debug "Autoproj::Python.resolve_python: " \
140
- "resolver failed: #{e}"
135
+ "found python '#{bin}' version '#{version}'"
136
+ break
137
+ end
138
+ rescue RuntimeError => e
139
+ Autoproj.debug "Autoproj::Python.resolve_python: " \
140
+ "resolver failed: #{e}"
141
141
  end
142
142
 
143
143
  unless bin
@@ -159,8 +159,8 @@ module Autoproj
159
159
  # @param [String] version version constraint
160
160
  # @return [String,String] python path and python version
161
161
  def self.resolve_python(ws: Autoproj.workspace,
162
- bin: nil,
163
- version: nil)
162
+ bin: nil,
163
+ version: nil)
164
164
  if bin
165
165
  custom_resolve_python(bin: bin, version: version)
166
166
  else
@@ -183,12 +183,12 @@ module Autoproj
183
183
  unless File.exist?(shim_path)
184
184
  FileUtils.mkdir_p shim_path
185
185
  Autoproj.warn "Autoproj::Python.rewrite_python_shims: creating "\
186
- "#{shim_path} - "\
187
- "are you operating on a valid autoproj workspace?"
186
+ "#{shim_path} - "\
187
+ "are you operating on a valid autoproj workspace?"
188
188
  end
189
189
 
190
- python_path = File.join(shim_path, 'python')
191
- File.open(python_path, 'w') do |io|
190
+ python_path = File.join(shim_path, "python")
191
+ File.open(python_path, "w") do |io|
192
192
  io.puts "#! /bin/sh"
193
193
  io.puts "exec #{python_executable} \"$@\""
194
194
  end
@@ -201,11 +201,11 @@ module Autoproj
201
201
  unless File.exist?(shim_path)
202
202
  FileUtils.mkdir_p shim_path
203
203
  Autoproj.warn "Autoproj::Python.rewrite_pip_shims: creating "\
204
- "#{shim_path} - "\
205
- "are you operating on a valid autoproj workspace?"
204
+ "#{shim_path} - "\
205
+ "are you operating on a valid autoproj workspace?"
206
206
  end
207
- pip_path = File.join(shim_path, 'pip')
208
- File.open(pip_path, 'w') do |io|
207
+ pip_path = File.join(shim_path, "pip")
208
+ File.open(pip_path, "w") do |io|
209
209
  io.puts "#! /bin/sh"
210
210
  io.puts "exec #{python_executable} -m pip \"$@\""
211
211
  end
@@ -216,11 +216,11 @@ module Autoproj
216
216
  # Activate configuration for python in the autoproj configuration
217
217
  # @return [String,String] python path and python version
218
218
  def self.activate_python(ws: Autoproj.workspace,
219
- bin: nil,
220
- version: nil)
219
+ bin: nil,
220
+ version: nil)
221
221
  bin, version = resolve_python(ws: ws, bin: bin, version: version)
222
- ws.config.set('python_executable', bin, true)
223
- ws.config.set('python_version', version, true)
222
+ ws.config.set("python_executable", bin, true)
223
+ ws.config.set("python_version", version, true)
224
224
 
225
225
  ws.osdep_suffixes << "python#{$1}" if version =~ /^([0-9]+)\./
226
226
 
@@ -232,8 +232,8 @@ module Autoproj
232
232
  def self.deactivate_python(ws: Autoproj.workspace)
233
233
  remove_python_shims(ws.root_dir)
234
234
  remove_pip_shims(ws.root_dir)
235
- ws.config.reset('python_executable')
236
- ws.config.reset('python_version')
235
+ ws.config.reset("python_executable")
236
+ ws.config.reset("python_version")
237
237
  end
238
238
 
239
239
  # Allow to update the PYTHONPATH for package if autoproj configuration
@@ -247,32 +247,32 @@ module Autoproj
247
247
  # @return tuple of [executable, version, site-packages path] if set,
248
248
  # otherwise nil
249
249
  def self.activate_python_path(pkg,
250
- ws: Autoproj.workspace,
251
- bin: nil,
252
- version: nil)
253
- return unless ws.config.get('USE_PYTHON', nil)
250
+ ws: Autoproj.workspace,
251
+ bin: nil,
252
+ version: nil)
253
+ return unless ws.config.get("USE_PYTHON", nil)
254
254
 
255
255
  bin, version = resolve_python(ws: ws, bin: bin, version: version)
256
256
  path = File.join(pkg.prefix, "lib",
257
257
  "python#{version}", "site-packages")
258
- pkg.env_add_path 'PYTHONPATH', path
258
+ pkg.env_add_path "PYTHONPATH", path
259
259
 
260
260
  [bin, version, path]
261
261
  end
262
262
 
263
263
  def self.setup_python_configuration_options(ws: Autoproj.workspace)
264
- ws.config.declare 'USE_PYTHON', 'boolean',
265
- default: 'no',
264
+ ws.config.declare "USE_PYTHON", "boolean",
265
+ default: "no",
266
266
  doc: ["Do you want to activate python?"]
267
267
 
268
268
  if ws.config.get("USE_PYTHON")
269
- unless ws.config.has_value_for?('python_executable')
269
+ unless ws.config.has_value_for?("python_executable")
270
270
  remove_python_shims(ws.root_dir)
271
271
  remove_pip_shims(ws.root_dir)
272
272
  python_bin, = auto_resolve_python(ws: ws)
273
273
  end
274
274
 
275
- ws.config.declare 'python_executable', 'string',
275
+ ws.config.declare "python_executable", "string",
276
276
  default: python_bin.to_s,
277
277
  doc: ["Select the path to the python executable"]
278
278
 
@@ -10,6 +10,7 @@ module Autoproj
10
10
  attr_reader :fields
11
11
  # The expected value
12
12
  attr_reader :value
13
+
13
14
  # Whether the match can be partial
14
15
  attr_predicate :partial?, true
15
16
 
@@ -19,7 +20,9 @@ module Autoproj
19
20
  #
20
21
  # Use {.all}
21
22
  class All
22
- def match(pkg); true end
23
+ def match(pkg)
24
+ true
25
+ end
23
26
  end
24
27
 
25
28
  # Get a query that matches anything
@@ -57,13 +60,14 @@ module Autoproj
57
60
  # @api private
58
61
  #
59
62
  # Parse a single field in a query (i.e. a FIELD[=~]VALUE string)
60
- #
63
+ #
61
64
  # This is NOT meant to be used directly. Subclasses are supposed to
62
65
  # redefine .parse to create the relevant match object.
63
66
  def self.parse(str, allowed_fields: [], default_fields: Hash.new)
64
- if parsed = /[=~]/.match(str)
65
- field, value = parsed.pre_match, parsed.post_match
66
- partial = (parsed[0] == '~')
67
+ if (parsed = /[=~]/.match(str))
68
+ field = parsed.pre_match
69
+ value = parsed.post_match
70
+ partial = (parsed[0] == "~")
67
71
  else
68
72
  raise ArgumentError, "invalid query string '#{str}', expected FIELD and VALUE separated by either = or ~"
69
73
  end
@@ -71,17 +75,17 @@ module Autoproj
71
75
  field = default_fields[field] || field
72
76
 
73
77
  # Validate the query key
74
- if !allowed_fields.include?(field)
78
+ unless allowed_fields.include?(field)
75
79
  raise ArgumentError, "'#{field}' is not a known query key"
76
80
  end
77
81
 
78
- fields = field.split('.')
79
- return fields, value, partial
82
+ fields = field.split(".")
83
+ [fields, value, partial]
80
84
  end
81
85
 
82
86
  # Parse a complete query
83
87
  def self.parse_query(query, *args)
84
- query = query.split(':')
88
+ query = query.split(":")
85
89
  query = query.map do |str|
86
90
  parse(str, *args)
87
91
  end
@@ -97,9 +101,11 @@ module Autoproj
97
101
  def initialize(submatches)
98
102
  @submatches = submatches
99
103
  end
104
+
100
105
  def each_subquery(&block)
101
106
  @submatches.each(&block)
102
107
  end
108
+
103
109
  def match(pkg)
104
110
  @submatches.map { |m| m.match(pkg) }.compact.max
105
111
  end
@@ -110,19 +116,19 @@ module Autoproj
110
116
  def initialize(submatches)
111
117
  @submatches = submatches
112
118
  end
119
+
113
120
  def each_subquery(&block)
114
121
  @submatches.each(&block)
115
122
  end
123
+
116
124
  def match(pkg)
117
125
  matches = @submatches.map do |m|
118
- if p = m.match(pkg)
119
- p
120
- else return
121
- end
126
+ return unless (p = m.match(pkg))
127
+
128
+ p
122
129
  end
123
130
  matches.min
124
131
  end
125
132
  end
126
133
  end
127
134
  end
128
-
@@ -1,10 +1,12 @@
1
- require 'autobuild/reporting'
1
+ require "autobuild/reporting"
2
2
  module Autoproj
3
3
  class << self
4
4
  attr_accessor :verbose
5
+
5
6
  def silent?
6
7
  Autobuild.silent?
7
8
  end
9
+
8
10
  def silent=(value)
9
11
  Autobuild.silent = value
10
12
  end
@@ -70,18 +72,18 @@ module Autoproj
70
72
  secs = Time.now - @timer_start
71
73
  return if secs < 1
72
74
 
73
- [[60, 'sec'], [60, 'min'], [24, 'hour'], [1000, 'day']].map do |count, name|
75
+ [[60, "sec"], [60, "min"], [24, "hour"], [1000, "day"]].map do |count, name|
74
76
  if secs > 0
75
77
  secs, n = secs.divmod(count)
76
78
  next if (val = n.to_i) == 0
77
79
 
78
- "#{val} #{val > 1 ? name + 's' : name}"
80
+ "#{val} #{val > 1 ? "#{name}s" : name}"
79
81
  end
80
- end.compact.reverse.join(' ')
82
+ end.compact.reverse.join(" ")
81
83
  end
82
84
 
83
85
  def success
84
- elapsed_string = elapsed_time ? " (took #{elapsed_time})" : ''
86
+ elapsed_string = elapsed_time ? " (took #{elapsed_time})" : ""
85
87
  Autoproj.message("Command finished successfully at "\
86
88
  "#{Time.now}#{elapsed_string}", :bold, :green)
87
89
  if Autobuild.post_success_message
@@ -91,9 +93,9 @@ module Autoproj
91
93
  end
92
94
 
93
95
  def self.report(root_dir: nil, silent: nil, debug: Autobuild.debug,
94
- on_package_success: :report,
95
- on_package_failures: Autobuild::Reporting
96
- .default_report_on_package_failures)
96
+ on_package_success: :report,
97
+ on_package_failures: Autobuild::Reporting
98
+ .default_report_on_package_failures)
97
99
  reporter = Autoproj::Reporter.new
98
100
  Autobuild::Reporting << reporter
99
101
  interrupted = nil
@@ -105,24 +107,22 @@ module Autoproj
105
107
 
106
108
  package_failures =
107
109
  Autobuild::Reporting.report(on_package_failures: :report_silent) do
108
- begin
109
- reporter.reset_timer
110
- yield
111
- rescue Interrupt => e
112
- interrupted = e
113
- end
110
+ reporter.reset_timer
111
+ yield
112
+ rescue Interrupt => e
113
+ interrupted = e
114
114
  end
115
115
 
116
-
117
116
  if package_failures.empty?
118
117
  raise interrupted if interrupted
119
118
 
120
119
  Autobuild::Reporting.success if on_package_success == :report
121
- return []
120
+ []
122
121
  else
123
- Autobuild::Reporting.report_finish_on_error(package_failures,
124
- on_package_failures: on_package_failures,
125
- interrupted_by: interrupted)
122
+ Autobuild::Reporting.report_finish_on_error(
123
+ package_failures,
124
+ on_package_failures: on_package_failures, interrupted_by: interrupted
125
+ )
126
126
  end
127
127
  rescue CLI::CLIException, InvalidWorkspace, ConfigError => e
128
128
  if silent_errors