lib/autoproj/autobuild.rb in autoproj-1.5.7 vs lib/autoproj/autobuild.rb in autoproj-1.5.8
- old
+ new
@@ -21,11 +21,11 @@
rescue Exception => e
if explicit_selection
raise e
else
# Re-call osdeps to get a proper error message
- osdeps, gems = Autoproj.osdeps.partition_packages([name].to_set)
+ osdeps, gems = Autoproj.osdeps.partition_packages([name].to_set, name => [self.name])
Autoproj.osdeps.resolve_os_dependencies(osdeps)
end
end
end
end
@@ -44,26 +44,23 @@
# Subclass of Autobuild::Reporter, used to display a message when the build
# finishes/fails.
class Reporter < Autobuild::Reporter
def error(error)
error_lines = error.to_s.split("\n")
- STDERR.puts color("Build failed: #{error_lines.shift}", :bold, :red)
- STDERR.puts error_lines.join("\n")
+ Autoproj.progress("Build failed: #{error_lines.shift}", :bold, :red)
+ error_lines.each do |line|
+ Autoproj.progress line
+ end
end
def success
- STDERR.puts color("Build finished successfully at #{Time.now}", :bold, :green)
+ Autoproj.progress("Build finished successfully at #{Time.now}", :bold, :green)
if Autobuild.post_success_message
- puts Autobuild.post_success_message
+ Autoproj.progress Autobuild.post_success_message
end
end
end
- # Displays a warning message
- def self.warn(message)
- STDERR.puts Autoproj.console.color(" WARN: #{message}", :magenta)
- end
-
@file_stack = Array.new
def self.package_name_from_options(spec)
if spec.kind_of?(Hash)
spec.to_a.first.first.to_str
@@ -106,9 +103,15 @@
end
@loaded_autobuild_files << path
ensure
@file_stack.pop
+ end
+end
+
+def ignore(*paths)
+ paths.each do |p|
+ Autobuild.ignore(p)
end
end
# Common setup for packages
def package_common(package_type, spec, &block) # :nodoc: