autoproj 2.12.0 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/lint.yml +25 -0
- data/.github/workflows/test.yml +30 -0
- data/.rubocop.yml +79 -91
- data/.rubocop_todo.yml +1473 -0
- data/Gemfile +9 -9
- data/Rakefile +24 -24
- data/autoproj.gemspec +22 -22
- data/bin/alocate +4 -4
- data/bin/alog +6 -7
- data/bin/amake +4 -4
- data/bin/aup +4 -4
- data/bin/autoproj +2 -2
- data/bin/autoproj_bootstrap +186 -183
- data/bin/autoproj_bootstrap.in +7 -8
- data/bin/autoproj_install +185 -182
- data/bin/autoproj_install.in +6 -7
- data/lib/autoproj/aruba_minitest.rb +6 -11
- data/lib/autoproj/autobuild.rb +5 -6
- data/lib/autoproj/autobuild_extensions/archive_importer.rb +10 -11
- data/lib/autoproj/autobuild_extensions/dsl.rb +61 -44
- data/lib/autoproj/autobuild_extensions/git.rb +27 -26
- data/lib/autoproj/autobuild_extensions/package.rb +23 -22
- data/lib/autoproj/autobuild_extensions/svn.rb +1 -2
- data/lib/autoproj/base.rb +1 -1
- data/lib/autoproj/bash_completion.rb +5 -6
- data/lib/autoproj/build_option.rb +22 -24
- data/lib/autoproj/cli/base.rb +27 -27
- data/lib/autoproj/cli/bootstrap.rb +14 -16
- data/lib/autoproj/cli/build.rb +18 -10
- data/lib/autoproj/cli/cache.rb +51 -8
- data/lib/autoproj/cli/clean.rb +10 -10
- data/lib/autoproj/cli/commit.rb +7 -8
- data/lib/autoproj/cli/doc.rb +2 -2
- data/lib/autoproj/cli/envsh.rb +1 -2
- data/lib/autoproj/cli/exec.rb +60 -20
- data/lib/autoproj/cli/inspection_tool.rb +18 -13
- data/lib/autoproj/cli/locate.rb +30 -41
- data/lib/autoproj/cli/log.rb +7 -7
- data/lib/autoproj/cli/main.rb +217 -205
- data/lib/autoproj/cli/main_doc.rb +22 -21
- data/lib/autoproj/cli/main_global.rb +44 -19
- data/lib/autoproj/cli/main_plugin.rb +18 -18
- data/lib/autoproj/cli/main_test.rb +28 -27
- data/lib/autoproj/cli/manifest.rb +7 -7
- data/lib/autoproj/cli/osdeps.rb +12 -11
- data/lib/autoproj/cli/patcher.rb +2 -3
- data/lib/autoproj/cli/query.rb +17 -18
- data/lib/autoproj/cli/reconfigure.rb +1 -2
- data/lib/autoproj/cli/reset.rb +9 -12
- data/lib/autoproj/cli/show.rb +48 -55
- data/lib/autoproj/cli/status.rb +56 -44
- data/lib/autoproj/cli/switch_config.rb +5 -6
- data/lib/autoproj/cli/tag.rb +12 -11
- data/lib/autoproj/cli/test.rb +7 -7
- data/lib/autoproj/cli/update.rb +104 -51
- data/lib/autoproj/cli/utility.rb +14 -12
- data/lib/autoproj/cli/version.rb +42 -40
- data/lib/autoproj/cli/versions.rb +14 -15
- data/lib/autoproj/cli/watch.rb +33 -37
- data/lib/autoproj/cli/which.rb +16 -20
- data/lib/autoproj/cli.rb +4 -2
- data/lib/autoproj/configuration.rb +78 -85
- data/lib/autoproj/default.osdeps +29 -3
- data/lib/autoproj/environment.rb +42 -23
- data/lib/autoproj/exceptions.rb +9 -3
- data/lib/autoproj/find_workspace.rb +20 -25
- data/lib/autoproj/git_server_configuration.rb +40 -44
- data/lib/autoproj/gitorious.rb +1 -1
- data/lib/autoproj/installation_manifest.rb +64 -29
- data/lib/autoproj/local_package_set.rb +13 -11
- data/lib/autoproj/manifest.rb +145 -135
- data/lib/autoproj/metapackage.rb +2 -6
- data/lib/autoproj/ops/atomic_write.rb +7 -6
- data/lib/autoproj/ops/build.rb +4 -6
- data/lib/autoproj/ops/cache.rb +64 -53
- data/lib/autoproj/ops/cached_env.rb +7 -6
- data/lib/autoproj/ops/configuration.rb +511 -506
- data/lib/autoproj/ops/import.rb +90 -61
- data/lib/autoproj/ops/install.rb +179 -175
- data/lib/autoproj/ops/loader.rb +77 -76
- data/lib/autoproj/ops/main_config_switcher.rb +36 -45
- data/lib/autoproj/ops/phase_reporting.rb +4 -4
- data/lib/autoproj/ops/snapshot.rb +250 -247
- data/lib/autoproj/ops/tools.rb +76 -78
- data/lib/autoproj/ops/watch.rb +6 -6
- data/lib/autoproj/ops/which.rb +17 -14
- data/lib/autoproj/options.rb +13 -2
- data/lib/autoproj/os_package_installer.rb +102 -92
- data/lib/autoproj/os_package_query.rb +7 -13
- data/lib/autoproj/os_package_resolver.rb +189 -140
- data/lib/autoproj/os_repository_installer.rb +4 -4
- data/lib/autoproj/os_repository_resolver.rb +8 -6
- data/lib/autoproj/package_definition.rb +12 -13
- data/lib/autoproj/package_managers/apt_dpkg_manager.rb +46 -31
- data/lib/autoproj/package_managers/bundler_manager.rb +156 -118
- data/lib/autoproj/package_managers/debian_version.rb +25 -21
- data/lib/autoproj/package_managers/emerge_manager.rb +2 -3
- data/lib/autoproj/package_managers/gem_manager.rb +68 -77
- data/lib/autoproj/package_managers/homebrew_manager.rb +3 -4
- data/lib/autoproj/package_managers/manager.rb +8 -3
- data/lib/autoproj/package_managers/pacman_manager.rb +2 -3
- data/lib/autoproj/package_managers/pip_manager.rb +37 -27
- data/lib/autoproj/package_managers/pkg_manager.rb +3 -4
- data/lib/autoproj/package_managers/port_manager.rb +2 -3
- data/lib/autoproj/package_managers/shell_script_manager.rb +66 -36
- data/lib/autoproj/package_managers/unknown_os_manager.rb +5 -8
- data/lib/autoproj/package_managers/yum_manager.rb +12 -15
- data/lib/autoproj/package_managers/zypper_manager.rb +11 -14
- data/lib/autoproj/package_manifest.rb +66 -53
- data/lib/autoproj/package_selection.rb +187 -187
- data/lib/autoproj/package_set.rb +128 -114
- data/lib/autoproj/python.rb +285 -0
- data/lib/autoproj/query_base.rb +20 -14
- data/lib/autoproj/reporter.rb +19 -19
- data/lib/autoproj/repository_managers/apt.rb +101 -67
- data/lib/autoproj/repository_managers/unknown_os_manager.rb +3 -3
- data/lib/autoproj/shell_completion.rb +16 -13
- data/lib/autoproj/source_package_query.rb +29 -36
- data/lib/autoproj/system.rb +32 -21
- data/lib/autoproj/test.rb +131 -106
- data/lib/autoproj/variable_expansion.rb +10 -10
- data/lib/autoproj/vcs_definition.rb +53 -37
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +162 -117
- data/lib/autoproj/zsh_completion.rb +8 -9
- data/lib/autoproj.rb +53 -53
- data/samples/autoproj/init.rb +1 -2
- metadata +62 -72
- data/.travis.yml +0 -22
data/Gemfile
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem
|
3
|
+
gem "autobuild", git: "https://github.com/rock-core/autobuild", branch: "master"
|
4
4
|
|
5
5
|
group :vscode do
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
6
|
+
gem "debase", ">= 0.2.2.beta10"
|
7
|
+
gem "pry"
|
8
|
+
gem "pry-byebug"
|
9
|
+
gem "rubocop", ">= 0.6.0"
|
10
|
+
gem "rubocop-rock"
|
11
|
+
gem "ruby-debug-ide", ">= 0.6.0"
|
12
|
+
gem "solargraph"
|
13
13
|
end
|
14
14
|
gemspec
|
data/Rakefile
CHANGED
@@ -1,45 +1,45 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rake/testtask"
|
3
3
|
|
4
|
-
task
|
5
|
-
task
|
4
|
+
task "default"
|
5
|
+
task "gem" => "build"
|
6
6
|
|
7
7
|
Rake::TestTask.new(:test) do |t|
|
8
8
|
t.libs << "lib" << Dir.pwd
|
9
|
-
t.test_files = FileList[
|
9
|
+
t.test_files = FileList["test/**/test_*.rb"]
|
10
10
|
end
|
11
11
|
|
12
12
|
desc "generate the bootstrap script"
|
13
|
-
task
|
14
|
-
require
|
15
|
-
autoproj_ops_install = File.read(File.join(Dir.pwd,
|
13
|
+
task "bootstrap" do
|
14
|
+
require "yaml"
|
15
|
+
autoproj_ops_install = File.read(File.join(Dir.pwd, "lib", "autoproj", "ops", "install.rb"))
|
16
16
|
# Since we are using gsub to replace the content in the bootstrap file,
|
17
17
|
# we have to quote all \
|
18
|
-
autoproj_ops_install.gsub!
|
18
|
+
autoproj_ops_install.gsub!(/\\/, "\\\\\\\\")
|
19
19
|
|
20
|
-
%w
|
21
|
-
bootstrap_code = File.read(File.join(Dir.pwd,
|
22
|
-
|
23
|
-
File.open(File.join(Dir.pwd,
|
20
|
+
%w[bootstrap install].each do |install_script|
|
21
|
+
bootstrap_code = File.read(File.join(Dir.pwd, "bin", "autoproj_#{install_script}.in"))
|
22
|
+
.gsub("require 'autoproj/ops/install'", autoproj_ops_install)
|
23
|
+
File.open(File.join(Dir.pwd, "bin", "autoproj_#{install_script}"), "w") do |io|
|
24
24
|
io.write bootstrap_code
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
require
|
30
|
-
require
|
29
|
+
require "autoproj/bash_completion"
|
30
|
+
require "autoproj/zsh_completion"
|
31
31
|
|
32
|
-
shells = [[
|
32
|
+
shells = [["bash", Autoproj::BashCompletion], ["zsh", Autoproj::ZshCompletion]]
|
33
33
|
clis = [%w[alocate locate], %w[alog log], %w[amake build], %w[aup update],
|
34
|
-
[
|
34
|
+
["autoproj", nil]]
|
35
35
|
|
36
|
-
shell_dir = File.join(Dir.pwd,
|
37
|
-
completion_dir = File.join(shell_dir,
|
36
|
+
shell_dir = File.join(Dir.pwd, "shell")
|
37
|
+
completion_dir = File.join(shell_dir, "completion")
|
38
38
|
|
39
|
-
desc
|
40
|
-
task
|
41
|
-
require
|
42
|
-
templates_dir = File.join(Dir.pwd,
|
39
|
+
desc "generate the shell helpers scripts"
|
40
|
+
task "helpers" do
|
41
|
+
require "erb"
|
42
|
+
templates_dir = File.join(Dir.pwd, "lib", "autoproj", "templates")
|
43
43
|
FileUtils.mkdir_p(completion_dir)
|
44
44
|
|
45
45
|
shells.each do |shell|
|
@@ -47,13 +47,13 @@ task 'helpers' do
|
|
47
47
|
completion = shell[1].new(cli[0], command: cli[1])
|
48
48
|
completion_file = File.join(completion_dir, "#{cli[0]}_#{shell[0]}")
|
49
49
|
|
50
|
-
|
50
|
+
File.write(completion_file, completion.generate)
|
51
51
|
end
|
52
52
|
erb = File.read(File.join(templates_dir, "helpers.#{shell[0]}.erb"))
|
53
53
|
helper_file = File.join(shell_dir, "autoproj_#{shell[0]}")
|
54
54
|
|
55
|
-
|
55
|
+
File.write(helper_file, ::ERB.new(erb, nil, "-").result(binding))
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
file
|
59
|
+
file "bin/autoproj_bootstrap" => "bootstrap"
|
data/autoproj.gemspec
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
require 'rbconfig'
|
3
2
|
|
4
|
-
|
3
|
+
require "rbconfig"
|
4
|
+
|
5
|
+
lib = File.expand_path("../lib", __FILE__)
|
5
6
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
6
|
-
require
|
7
|
+
require "autoproj/version"
|
7
8
|
|
8
9
|
Gem::Specification.new do |s|
|
9
10
|
s.name = "autoproj"
|
10
11
|
# The envvar is here for the benefit of tests that require to create gems
|
11
12
|
# with a "fake" version
|
12
|
-
s.version = ENV[
|
13
|
+
s.version = ENV["__AUTOPROJ_TEST_FAKE_VERSION"] || Autoproj::VERSION
|
13
14
|
s.authors = ["Sylvain Joyeux"]
|
14
15
|
s.email = "sylvain.joyeux@m4x.org"
|
15
16
|
s.summary = "Easy installation and management of sets of software packages"
|
@@ -17,29 +18,28 @@ Gem::Specification.new do |s|
|
|
17
18
|
s.homepage = "http://rock-robotics.org"
|
18
19
|
s.licenses = ["BSD"]
|
19
20
|
|
20
|
-
s.required_ruby_version =
|
21
|
-
s.bindir =
|
22
|
-
s.executables = [
|
21
|
+
s.required_ruby_version = ">= 2.5.0"
|
22
|
+
s.bindir = "bin"
|
23
|
+
s.executables = %w[autoproj aup amake alocate alog]
|
23
24
|
s.require_paths = ["lib"]
|
24
25
|
s.extensions = []
|
25
|
-
s.files
|
26
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
26
27
|
|
28
|
+
s.add_runtime_dependency "autobuild", ">= 1.21.0"
|
29
|
+
s.add_runtime_dependency "backports", "~> 3.0"
|
27
30
|
s.add_runtime_dependency "bundler"
|
28
|
-
s.add_runtime_dependency "
|
29
|
-
s.add_runtime_dependency "
|
30
|
-
s.add_runtime_dependency "
|
31
|
-
s.add_runtime_dependency "
|
32
|
-
s.add_runtime_dependency
|
33
|
-
s.add_runtime_dependency
|
34
|
-
s.add_runtime_dependency
|
35
|
-
s.add_runtime_dependency
|
36
|
-
s.
|
37
|
-
s.
|
38
|
-
s.add_development_dependency "flexmock", '~> 2.0', ">= 2.0.0"
|
31
|
+
s.add_runtime_dependency "concurrent-ruby", "~> 1.1"
|
32
|
+
s.add_runtime_dependency "rb-inotify" if RbConfig::CONFIG["target_os"] =~ /linux/
|
33
|
+
s.add_runtime_dependency "thor", "~> 1.0"
|
34
|
+
s.add_runtime_dependency "tty-color", "~> 0.5.0"
|
35
|
+
s.add_runtime_dependency "tty-prompt", "~> 0.21.0"
|
36
|
+
s.add_runtime_dependency "tty-spinner", "~> 0.9.0"
|
37
|
+
s.add_runtime_dependency "utilrb", "~> 3.0.0", ">= 3.0.0"
|
38
|
+
s.add_runtime_dependency "xdg", "= 2.2.5"
|
39
|
+
s.add_development_dependency "aruba"
|
40
|
+
s.add_development_dependency "flexmock", "~> 2.0", ">= 2.0.0"
|
39
41
|
s.add_development_dependency "minitest", "~> 5.0", ">= 5.0"
|
40
42
|
s.add_development_dependency "simplecov"
|
41
|
-
s.add_development_dependency "aruba"
|
42
|
-
s.add_development_dependency "tty-cursor"
|
43
43
|
s.add_development_dependency "timecop"
|
44
|
+
s.add_development_dependency "tty-cursor"
|
44
45
|
end
|
45
|
-
|
data/bin/alocate
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
3
|
+
require "autoproj/cli/main"
|
4
4
|
argv = Autoproj::CLI.basic_setup
|
5
5
|
|
6
6
|
class Alocate < Autoproj::CLI::Main
|
@@ -10,10 +10,10 @@ class Alocate < Autoproj::CLI::Main
|
|
10
10
|
end
|
11
11
|
|
12
12
|
begin
|
13
|
-
if argv.include?(
|
14
|
-
Alocate.start([
|
13
|
+
if argv.include?("--help") || argv.include?("help")
|
14
|
+
Alocate.start(%w[help locate])
|
15
15
|
else
|
16
|
-
Alocate.start([
|
16
|
+
Alocate.start(["locate", *argv])
|
17
17
|
end
|
18
18
|
rescue Interrupt
|
19
19
|
# Already notified in the reporting infrastructure
|
data/bin/alog
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "autoproj/cli/main"
|
4
|
+
require "autoproj/cli/locate"
|
5
5
|
|
6
6
|
argv = Autoproj::CLI.basic_setup
|
7
|
-
if argv.include?(
|
7
|
+
if argv.include?("--help") || argv.include?("help")
|
8
8
|
puts "Usage:"
|
9
9
|
puts " alog [package]"
|
10
10
|
puts
|
@@ -16,13 +16,12 @@ Autoproj.report(silent: true) do
|
|
16
16
|
cli = Autoproj::CLI::Locate.new
|
17
17
|
|
18
18
|
arg = argv.first || Dir.pwd
|
19
|
-
if File.directory?(arg)
|
20
|
-
arg = "#{File.expand_path(arg)}/"
|
21
|
-
end
|
19
|
+
arg = "#{File.expand_path(arg)}/" if File.directory?(arg)
|
22
20
|
log_files = cli.logs_of(arg, log: nil)
|
23
21
|
|
24
22
|
if log_files.size == 1
|
25
23
|
logfile = log_files.first
|
24
|
+
puts File.read(logfile)
|
26
25
|
elsif log_files.size > 1
|
27
26
|
begin
|
28
27
|
logfile = cli.select_log_file(log_files)
|
@@ -30,6 +29,6 @@ Autoproj.report(silent: true) do
|
|
30
29
|
rescue Interrupt
|
31
30
|
end
|
32
31
|
elsif log_files.empty?
|
33
|
-
raise "no logs found for #{
|
32
|
+
raise "no logs found for #{arg}"
|
34
33
|
end
|
35
34
|
end
|
data/bin/amake
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
3
|
+
require "autoproj/cli/main"
|
4
4
|
|
5
5
|
argv = Autoproj::CLI.basic_setup
|
6
6
|
class Amake < Autoproj::CLI::Main
|
@@ -10,10 +10,10 @@ class Amake < Autoproj::CLI::Main
|
|
10
10
|
end
|
11
11
|
|
12
12
|
begin
|
13
|
-
if argv.include?(
|
14
|
-
Amake.start([
|
13
|
+
if argv.include?("--help") || argv.include?("help")
|
14
|
+
Amake.start(%w[help build])
|
15
15
|
else
|
16
|
-
Amake.start([
|
16
|
+
Amake.start(["build", "--amake", *argv])
|
17
17
|
end
|
18
18
|
rescue Interrupt
|
19
19
|
# Already notified in the reporting infrastructure
|
data/bin/aup
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#! /usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
3
|
+
require "autoproj/cli/main"
|
4
4
|
|
5
5
|
argv = Autoproj::CLI.basic_setup
|
6
6
|
|
@@ -11,10 +11,10 @@ class Aup < Autoproj::CLI::Main
|
|
11
11
|
end
|
12
12
|
|
13
13
|
begin
|
14
|
-
if argv.include?(
|
15
|
-
Aup.start([
|
14
|
+
if argv.include?("--help") || argv.include?("help")
|
15
|
+
Aup.start(%w[help update])
|
16
16
|
else
|
17
|
-
Aup.start([
|
17
|
+
Aup.start(["update", *argv, "--aup"])
|
18
18
|
end
|
19
19
|
rescue Interrupt
|
20
20
|
# Already notified in the reporting infrastructure
|