lib/autoproj/autobuild.rb in autoproj-2.0.0.rc35 vs lib/autoproj/autobuild.rb in autoproj-2.0.0.rc36

- old
+ new

@@ -38,10 +38,15 @@ !config.get("osdeps_#{name}") end module Autobuild class Package + attr_writer :ws + def ws + @ws ||= Autoproj.workspace + end + # The Autoproj::PackageManifest object that describes this package attr_accessor :description # The set of tags for this package. This is an union of the tags # contained in +description+ and the ones explicitely added with # #add_tag @@ -134,10 +139,10 @@ optional_dependencies << name end def partition_package(pkg_name) pkg_autobuild, pkg_osdeps = [], [] - Autoproj.workspace.manifest.resolve_package_name(pkg_name).each do |type, dep_name| + ws.manifest.resolve_package_name(pkg_name).each do |type, dep_name| if type == :osdeps pkg_osdeps << dep_name elsif type == :package pkg_autobuild << dep_name else raise Autoproj::InternalError, "expected package type to be either :osdeps or :package, got #{type.inspect}"