autoproj 2.12.1 → 2.15.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/lint.yml +25 -0
  3. data/.github/workflows/test.yml +30 -0
  4. data/.rubocop.yml +79 -91
  5. data/.rubocop_todo.yml +1473 -0
  6. data/Gemfile +9 -9
  7. data/Rakefile +24 -24
  8. data/autoproj.gemspec +24 -22
  9. data/bin/alocate +4 -4
  10. data/bin/alog +6 -7
  11. data/bin/amake +4 -4
  12. data/bin/aup +4 -4
  13. data/bin/autoproj +3 -3
  14. data/bin/autoproj_bootstrap +225 -200
  15. data/bin/autoproj_bootstrap.in +7 -8
  16. data/bin/autoproj_install +224 -199
  17. data/bin/autoproj_install.in +6 -7
  18. data/lib/autoproj/aruba_minitest.rb +6 -11
  19. data/lib/autoproj/autobuild.rb +9 -6
  20. data/lib/autoproj/autobuild_extensions/archive_importer.rb +10 -11
  21. data/lib/autoproj/autobuild_extensions/dsl.rb +66 -36
  22. data/lib/autoproj/autobuild_extensions/git.rb +27 -26
  23. data/lib/autoproj/autobuild_extensions/package.rb +23 -22
  24. data/lib/autoproj/autobuild_extensions/python.rb +18 -0
  25. data/lib/autoproj/autobuild_extensions/svn.rb +1 -2
  26. data/lib/autoproj/base.rb +1 -1
  27. data/lib/autoproj/bash_completion.rb +5 -6
  28. data/lib/autoproj/build_option.rb +22 -24
  29. data/lib/autoproj/cli/base.rb +26 -26
  30. data/lib/autoproj/cli/bootstrap.rb +14 -16
  31. data/lib/autoproj/cli/build.rb +10 -7
  32. data/lib/autoproj/cli/cache.rb +11 -11
  33. data/lib/autoproj/cli/clean.rb +10 -10
  34. data/lib/autoproj/cli/commit.rb +7 -8
  35. data/lib/autoproj/cli/doc.rb +2 -2
  36. data/lib/autoproj/cli/envsh.rb +1 -2
  37. data/lib/autoproj/cli/exec.rb +60 -20
  38. data/lib/autoproj/cli/inspection_tool.rb +13 -7
  39. data/lib/autoproj/cli/locate.rb +30 -41
  40. data/lib/autoproj/cli/log.rb +7 -7
  41. data/lib/autoproj/cli/main.rb +217 -205
  42. data/lib/autoproj/cli/main_doc.rb +22 -21
  43. data/lib/autoproj/cli/main_global.rb +44 -19
  44. data/lib/autoproj/cli/main_plugin.rb +18 -18
  45. data/lib/autoproj/cli/main_test.rb +28 -27
  46. data/lib/autoproj/cli/manifest.rb +7 -7
  47. data/lib/autoproj/cli/osdeps.rb +12 -11
  48. data/lib/autoproj/cli/patcher.rb +2 -3
  49. data/lib/autoproj/cli/query.rb +17 -18
  50. data/lib/autoproj/cli/reconfigure.rb +1 -2
  51. data/lib/autoproj/cli/reset.rb +9 -12
  52. data/lib/autoproj/cli/show.rb +38 -39
  53. data/lib/autoproj/cli/status.rb +56 -44
  54. data/lib/autoproj/cli/switch_config.rb +5 -6
  55. data/lib/autoproj/cli/tag.rb +12 -11
  56. data/lib/autoproj/cli/test.rb +7 -7
  57. data/lib/autoproj/cli/update.rb +97 -43
  58. data/lib/autoproj/cli/utility.rb +14 -12
  59. data/lib/autoproj/cli/version.rb +42 -40
  60. data/lib/autoproj/cli/versions.rb +14 -15
  61. data/lib/autoproj/cli/watch.rb +33 -37
  62. data/lib/autoproj/cli/which.rb +16 -20
  63. data/lib/autoproj/cli.rb +4 -2
  64. data/lib/autoproj/configuration.rb +78 -86
  65. data/lib/autoproj/default.osdeps +29 -3
  66. data/lib/autoproj/environment.rb +42 -23
  67. data/lib/autoproj/exceptions.rb +9 -3
  68. data/lib/autoproj/find_workspace.rb +20 -25
  69. data/lib/autoproj/git_server_configuration.rb +40 -44
  70. data/lib/autoproj/gitorious.rb +1 -1
  71. data/lib/autoproj/installation_manifest.rb +64 -29
  72. data/lib/autoproj/local_package_set.rb +13 -11
  73. data/lib/autoproj/manifest.rb +139 -132
  74. data/lib/autoproj/metapackage.rb +2 -6
  75. data/lib/autoproj/ops/atomic_write.rb +7 -6
  76. data/lib/autoproj/ops/build.rb +4 -6
  77. data/lib/autoproj/ops/cache.rb +41 -43
  78. data/lib/autoproj/ops/cached_env.rb +5 -4
  79. data/lib/autoproj/ops/configuration.rb +519 -507
  80. data/lib/autoproj/ops/import.rb +88 -63
  81. data/lib/autoproj/ops/install.rb +218 -192
  82. data/lib/autoproj/ops/loader.rb +77 -76
  83. data/lib/autoproj/ops/main_config_switcher.rb +36 -45
  84. data/lib/autoproj/ops/phase_reporting.rb +4 -4
  85. data/lib/autoproj/ops/snapshot.rb +250 -247
  86. data/lib/autoproj/ops/tools.rb +76 -78
  87. data/lib/autoproj/ops/watch.rb +6 -6
  88. data/lib/autoproj/ops/which.rb +17 -14
  89. data/lib/autoproj/options.rb +13 -2
  90. data/lib/autoproj/os_package_installer.rb +102 -92
  91. data/lib/autoproj/os_package_query.rb +7 -13
  92. data/lib/autoproj/os_package_resolver.rb +189 -140
  93. data/lib/autoproj/os_repository_installer.rb +4 -4
  94. data/lib/autoproj/os_repository_resolver.rb +8 -6
  95. data/lib/autoproj/package_definition.rb +12 -13
  96. data/lib/autoproj/package_managers/apt_dpkg_manager.rb +19 -11
  97. data/lib/autoproj/package_managers/bundler_manager.rb +186 -129
  98. data/lib/autoproj/package_managers/debian_version.rb +25 -21
  99. data/lib/autoproj/package_managers/emerge_manager.rb +2 -3
  100. data/lib/autoproj/package_managers/gem_manager.rb +68 -77
  101. data/lib/autoproj/package_managers/homebrew_manager.rb +3 -4
  102. data/lib/autoproj/package_managers/manager.rb +8 -3
  103. data/lib/autoproj/package_managers/pacman_manager.rb +2 -3
  104. data/lib/autoproj/package_managers/pip_manager.rb +30 -28
  105. data/lib/autoproj/package_managers/pkg_manager.rb +3 -4
  106. data/lib/autoproj/package_managers/port_manager.rb +2 -3
  107. data/lib/autoproj/package_managers/shell_script_manager.rb +47 -25
  108. data/lib/autoproj/package_managers/unknown_os_manager.rb +5 -8
  109. data/lib/autoproj/package_managers/yum_manager.rb +12 -15
  110. data/lib/autoproj/package_managers/zypper_manager.rb +11 -14
  111. data/lib/autoproj/package_manifest.rb +28 -74
  112. data/lib/autoproj/package_selection.rb +187 -187
  113. data/lib/autoproj/package_set.rb +145 -114
  114. data/lib/autoproj/python.rb +297 -0
  115. data/lib/autoproj/query_base.rb +20 -14
  116. data/lib/autoproj/reporter.rb +19 -19
  117. data/lib/autoproj/repository_managers/apt.rb +102 -68
  118. data/lib/autoproj/repository_managers/unknown_os_manager.rb +3 -3
  119. data/lib/autoproj/ros_condition_parser.rb +84 -0
  120. data/lib/autoproj/ros_package_manifest.rb +125 -0
  121. data/lib/autoproj/shell_completion.rb +16 -13
  122. data/lib/autoproj/source_package_query.rb +29 -36
  123. data/lib/autoproj/system.rb +32 -21
  124. data/lib/autoproj/test.rb +131 -106
  125. data/lib/autoproj/variable_expansion.rb +10 -10
  126. data/lib/autoproj/vcs_definition.rb +53 -37
  127. data/lib/autoproj/version.rb +1 -1
  128. data/lib/autoproj/workspace.rb +143 -108
  129. data/lib/autoproj/zsh_completion.rb +8 -9
  130. data/lib/autoproj.rb +55 -53
  131. data/samples/autoproj/init.rb +1 -2
  132. metadata +86 -65
  133. data/.travis.yml +0 -22
@@ -3,7 +3,7 @@ module Autoproj
3
3
  # in autoproj/
4
4
  class LocalPackageSet < PackageSet
5
5
  def initialize(ws, local_dir: ws.config_dir)
6
- super(ws, VCSDefinition.none, name: 'main configuration', raw_local_dir: local_dir)
6
+ super(ws, VCSDefinition.none, name: "main configuration", raw_local_dir: local_dir)
7
7
  @local_dir = local_dir
8
8
  end
9
9
 
@@ -28,7 +28,7 @@ module Autoproj
28
28
  end
29
29
 
30
30
  def overrides_file_path
31
- if d = local_dir
31
+ if (d = local_dir)
32
32
  File.join(d, "overrides.yml")
33
33
  end
34
34
  end
@@ -47,7 +47,7 @@ module Autoproj
47
47
  # Load the files in overrides.d in addition to the overrides: field in
48
48
  # the yaml file
49
49
  def load_overrides(source_definition)
50
- files = Dir.glob(File.join( ws.overrides_dir, "*.yml" ) ).sort
50
+ files = Dir.glob(File.join(ws.overrides_dir, "*.yml")).sort
51
51
  overrides = files.map do |file|
52
52
  source_data = Autoproj.in_file(file, Autoproj::YAML_LOAD_ERROR) do
53
53
  YAML.load(File.read(file)) || Array.new
@@ -55,7 +55,8 @@ module Autoproj
55
55
  source_data =
56
56
  if source_data.respond_to?(:to_ary)
57
57
  source_data
58
- else source_data['overrides'] || Hash.new
58
+ else
59
+ source_data["overrides"] || Hash.new
59
60
  end
60
61
  [file, source_data]
61
62
  end
@@ -64,24 +65,25 @@ module Autoproj
64
65
 
65
66
  def raw_description_file
66
67
  description = Hash[
67
- 'imports' => Array.new,
68
- 'version_control' => Array.new,
69
- 'overrides' => Array.new]
68
+ "imports" => Array.new,
69
+ "version_control" => Array.new,
70
+ "overrides" => Array.new]
70
71
  if File.file?(overrides_file_path)
71
72
  overrides_data = Autoproj.in_file(overrides_file_path, Autoproj::YAML_LOAD_ERROR) do
72
73
  YAML.load(File.read(overrides_file_path)) || Hash.new
73
74
  end
74
75
  overrides_data = PackageSet.validate_and_normalize_source_file(
75
- overrides_file_path, overrides_data)
76
+ overrides_file_path, overrides_data
77
+ )
76
78
  description = description.merge(overrides_data)
77
79
  end
78
80
 
79
81
  manifest_data = Autoproj.in_file(manifest_path, Autoproj::YAML_LOAD_ERROR) do
80
82
  YAML.load(File.read(manifest_path)) || Hash.new
81
83
  end
82
- description['imports'] = description['imports'].
83
- concat(manifest_data['package_sets'] || Array.new)
84
- description['name'] = name
84
+ description["imports"] = description["imports"]
85
+ .concat(manifest_data["package_sets"] || Array.new)
86
+ description["name"] = name
85
87
  description
86
88
  end
87
89
  end