lib/autoproj/package_definition.rb in autoproj-2.14.0 vs lib/autoproj/package_definition.rb in autoproj-2.15.0

- old
+ new

@@ -13,10 +13,11 @@ # @return [PackageSet] the package set that defined this package attr_reader :package_set # @return [String] path to the file that contains this package's # definition attr_reader :file + # Whether this package is completely setup # # If the package is set up, its importer as well as all target # directories are properly set, and all {user_blocks} have been called. def setup? @@ -46,11 +47,11 @@ # dependencies # # @return [Array<String>] def modes @modes + autobuild.utilities - .values.find_all(&:enabled?).map(&:name) + .values.find_all(&:enabled?).map(&:name) end # The package name # @return [String] def name @@ -81,22 +82,20 @@ end def apply_dependencies_from_manifest manifest = autobuild.description manifest.each_dependency(modes) do |name, is_optional| - begin - if is_optional - autobuild.optional_dependency name - else - autobuild.depends_on name - end - rescue ConfigError => e - raise PackageNotFound.new(manifest.path), - "manifest #{manifest.path} of #{self.name} from "\ - "#{package_set.name} lists '#{name}' as dependency, "\ - 'but it is neither a normal package nor an osdeps '\ - "package. osdeps reports: #{e.message}", e.backtrace + if is_optional + autobuild.optional_dependency name + else + autobuild.depends_on name end + rescue ConfigError => e + raise PackageNotFound.new(manifest.path), + "manifest #{manifest.path} of #{self.name} from "\ + "#{package_set.name} lists '#{name}' as dependency, "\ + "but it is neither a normal package nor an osdeps "\ + "package. osdeps reports: #{e.message}", e.backtrace end end end end