diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-02 18:34:47 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-07 11:29:40 +0100 |
commit | fba7620021d32afb03cb10aa9d1ebb194721bb67 (patch) | |
tree | e0d71abb888312ad57951db7af75195afa22a60a | |
parent | 95e699482783c93ed323d8a328ded6bd319b9903 (diff) | |
download | morph-fba7620021d32afb03cb10aa9d1ebb194721bb67.tar.gz |
import: omnibus.to_lorry improvements
-rwxr-xr-x | import/omnibus.to_lorry | 20 | ||||
-rw-r--r-- | morphlib/util.py | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/import/omnibus.to_lorry b/import/omnibus.to_lorry index ed2e552d..0172faad 100755 --- a/import/omnibus.to_lorry +++ b/import/omnibus.to_lorry @@ -49,9 +49,9 @@ class OmnibusLorryGenerator < Importer::Base exit 255 end - definitions_and_project, software_name = parsed_arguments - definitions_dir, _, project_name = definitions_and_project.rpartition('#') - [definitions_dir, project_name, software_name] + project_dir_and_name, software_name = parsed_arguments + project_dir, _, project_name = project_dir_and_name.rpartition('#') + [project_dir, project_name, software_name] end def generate_lorry_for_software(software) @@ -77,7 +77,19 @@ class OmnibusLorryGenerator < Importer::Base end def run - definitions_dir, project_name, software_name = parse_options(ARGV) + STDERR.puts("Current working directory: #{Dir.getwd}") + log.info("Current working directory: #{Dir.getwd}") + project_dir, project_name, software_name = parse_options(ARGV) + + log.info("Creating lorry for #{software_name} from project " + + "#{project_name}, defined in #{project_dir}") + + # Omnibus definitions are spread across multiple repos, and there is + # no stability guarantee for the definition format. The official advice + # is to use Bundler to execute Omnibus, so let's do that. + ensure_running_inside_bundler_exec(project_dir) + + STDERR.puts Omnibus.projects() project = Omnibus::Project.load(project_name) diff --git a/morphlib/util.py b/morphlib/util.py index 36ab4e21..a7424aed 100644 --- a/morphlib/util.py +++ b/morphlib/util.py @@ -172,7 +172,7 @@ def combine_aliases(app): # pragma: no cover m.group('prefix'), _expand(m.group('pull'), m.group('path')), _expand(m.group('push'), m.group('path'))) - elif '=' not in trove_id: + elif '=' not in trove_id and trove_id not in alias_map: alias_map[trove_id] = "%s=%s#%s" % ( trove_id, _expand('ssh', trove_id), |