From ecf4de76a75d286af7d6996734650083d885d98a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Fri, 10 Oct 2014 16:14:11 +0100 Subject: import: Omnibus: add static data and dependency blacklist --- import/omnibus.to_chunk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/import/omnibus.to_chunk b/import/omnibus.to_chunk index 8081f9fb..f08e7dc4 100755 --- a/import/omnibus.to_chunk +++ b/import/omnibus.to_chunk @@ -104,6 +104,11 @@ class Omnibus::Builder end class OmnibusChunkMorphologyGenerator < Importer::Base + def initialize + local_data = YAML.load_file("omnibus.yaml") + @dependency_blacklist = local_data['dependency-blacklist'] + end + def parse_options(arguments) opts = create_option_parser(BANNER, DESCRIPTION) @@ -193,6 +198,7 @@ class OmnibusChunkMorphologyGenerator < Importer::Base morphology = { "name" => software.name, "kind" => "chunk", + "description" => "Automatically generated by omnibus.to_chunk" } end @@ -201,7 +207,10 @@ class OmnibusChunkMorphologyGenerator < Importer::Base software.dependencies.each do |name| software = Omnibus::Software.load(project, name) - if software.fetcher.instance_of?(Omnibus::PathFetcher) + if @dependency_blacklist.member? name + log.info( + "Not adding #{name} as a dependency as it is marked to be ignored.") + elsif software.fetcher.instance_of?(Omnibus::PathFetcher) log.info( "Not adding #{name} as a dependency: it's installed from " + "a path which probably means that it is package configuration, not " + -- cgit v1.2.1