lib/autoproj/package_definition.rb in autoproj-1.12.6 vs lib/autoproj/package_definition.rb in autoproj-1.13.0.b1
- old
+ new
@@ -30,9 +30,22 @@
def initialize(autobuild, package_set, file)
@autobuild, @package_set, @file =
autobuild, package_set, file
@user_blocks = []
+ @modes = ['import', 'build']
+ end
+
+ # The modes in which this package will be used
+ #
+ # Mainly used during dependency resolution to disable unneeded
+ # dependencies
+ #
+ # @return [Array<String>]
+ def modes
+ @modes + autobuild.utilities.values.
+ find_all { |u| u.enabled? }.
+ map(&:name)
end
# The package name
# @return [String]
def name