| Class | Uttk::Strategies::PackageCollection |
| In: |
lib/uttk/strategies/PackageCollection.rb
|
| Parent: | Composite |
This strategy takes a set of packages with their dependencies, it computes the topological sort, and make all packages in the right order.
# File lib/uttk/strategies/PackageCollection.rb, line 19 def prologue super @dependencies = Pathname.new(@dependencies) @deps = YAML::load(@dependencies.read) @order = @deps.tsort_from(@target) @order.each do |dep| @symtbl["#{dep}_install_dir".to_sym] = "<<pwd>>/#{dep}" create(Import) do |t| t.name = dep t.import = "#{dep}.yml" t.symtbl[:configure_flags] = @deps[dep].map { |d| "--with-#{d}=<<pwd>>/#{d}" }.join(' ') t.fatal = true end end end