autoproj 1.13.7 → 2.0.0.b1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/.gemtest +0 -0
  3. data/Manifest.txt +27 -21
  4. data/Rakefile +4 -6
  5. data/bin/alocate +5 -1
  6. data/bin/amake +3 -53
  7. data/bin/aup +3 -50
  8. data/bin/autoproj +3 -264
  9. data/bin/autoproj_bootstrap +294 -349
  10. data/bin/autoproj_bootstrap.in +27 -3
  11. data/lib/autoproj.rb +23 -1
  12. data/lib/autoproj/autobuild.rb +51 -89
  13. data/lib/autoproj/base.rb +0 -9
  14. data/lib/autoproj/build_option.rb +1 -3
  15. data/lib/autoproj/cli.rb +1 -0
  16. data/lib/autoproj/cli/base.rb +155 -0
  17. data/lib/autoproj/cli/bootstrap.rb +119 -0
  18. data/lib/autoproj/cli/build.rb +72 -0
  19. data/lib/autoproj/cli/cache.rb +31 -0
  20. data/lib/autoproj/cli/clean.rb +37 -0
  21. data/lib/autoproj/cli/commit.rb +41 -0
  22. data/lib/autoproj/cli/doc.rb +22 -0
  23. data/lib/autoproj/cli/envsh.rb +22 -0
  24. data/lib/autoproj/cli/inspection_tool.rb +73 -0
  25. data/lib/autoproj/cli/locate.rb +96 -0
  26. data/lib/autoproj/cli/log.rb +26 -0
  27. data/lib/autoproj/cli/main.rb +249 -0
  28. data/lib/autoproj/cli/main_test.rb +57 -0
  29. data/lib/autoproj/cli/osdeps.rb +30 -0
  30. data/lib/autoproj/cli/query.rb +43 -0
  31. data/lib/autoproj/cli/reconfigure.rb +19 -0
  32. data/lib/autoproj/cli/reset.rb +7 -32
  33. data/lib/autoproj/cli/show.rb +219 -0
  34. data/lib/autoproj/cli/snapshot.rb +1 -1
  35. data/lib/autoproj/cli/status.rb +149 -0
  36. data/lib/autoproj/cli/switch_config.rb +28 -0
  37. data/lib/autoproj/cli/tag.rb +9 -35
  38. data/lib/autoproj/cli/test.rb +34 -55
  39. data/lib/autoproj/cli/update.rb +158 -0
  40. data/lib/autoproj/cli/versions.rb +32 -69
  41. data/lib/autoproj/configuration.rb +95 -34
  42. data/lib/autoproj/default.osdeps +25 -35
  43. data/lib/autoproj/environment.rb +85 -63
  44. data/lib/autoproj/exceptions.rb +50 -0
  45. data/lib/autoproj/gitorious.rb +11 -9
  46. data/lib/autoproj/manifest.rb +199 -231
  47. data/lib/autoproj/metapackage.rb +0 -8
  48. data/lib/autoproj/ops/build.rb +1 -17
  49. data/lib/autoproj/ops/configuration.rb +92 -90
  50. data/lib/autoproj/ops/import.rb +222 -0
  51. data/lib/autoproj/ops/loader.rb +18 -8
  52. data/lib/autoproj/ops/main_config_switcher.rb +45 -73
  53. data/lib/autoproj/ops/snapshot.rb +5 -10
  54. data/lib/autoproj/ops/tools.rb +10 -44
  55. data/lib/autoproj/options.rb +35 -6
  56. data/lib/autoproj/osdeps.rb +97 -68
  57. data/lib/autoproj/package_selection.rb +39 -20
  58. data/lib/autoproj/package_set.rb +26 -24
  59. data/lib/autoproj/reporter.rb +91 -0
  60. data/lib/autoproj/system.rb +50 -149
  61. data/lib/autoproj/variable_expansion.rb +32 -6
  62. data/lib/autoproj/vcs_definition.rb +57 -17
  63. data/lib/autoproj/version.rb +1 -1
  64. data/lib/autoproj/workspace.rb +550 -0
  65. data/test/ops/test_snapshot.rb +26 -0
  66. data/test/test_package.rb +30 -0
  67. data/test/test_vcs_definition.rb +46 -0
  68. metadata +55 -50
  69. data/bin/autolocate +0 -3
  70. data/bin/autoproj-bootstrap +0 -68
  71. data/bin/autoproj-cache +0 -18
  72. data/bin/autoproj-clean +0 -13
  73. data/bin/autoproj-commit +0 -10
  74. data/bin/autoproj-create-set +0 -118
  75. data/bin/autoproj-doc +0 -28
  76. data/bin/autoproj-envsh +0 -14
  77. data/bin/autoproj-list +0 -69
  78. data/bin/autoproj-locate +0 -85
  79. data/bin/autoproj-log +0 -5
  80. data/bin/autoproj-query +0 -82
  81. data/bin/autoproj-reset +0 -13
  82. data/bin/autoproj-show +0 -192
  83. data/bin/autoproj-snapshot +0 -27
  84. data/bin/autoproj-switch-config +0 -24
  85. data/bin/autoproj-tag +0 -13
  86. data/bin/autoproj-test +0 -31
  87. data/bin/autoproj-versions +0 -20
  88. data/bin/autoproj_stress_test +0 -40
  89. data/lib/autoproj/cmdline.rb +0 -1649
@@ -0,0 +1,26 @@
1
+ require 'autoproj/test'
2
+
3
+ module Autoproj
4
+ module Ops
5
+ describe Snapshot do
6
+ attr_reader :manifest
7
+ before do
8
+ @manifest = create_bootstrap
9
+ end
10
+
11
+ describe ".update_log_available?" do
12
+ it "returns false if the main configuration is not managed by git" do
13
+ assert !Snapshot.update_log_available?(manifest)
14
+ end
15
+ it "returns true if the main configuration is managed by git even if it is not declared" do
16
+ system("git", "init", chdir: Autoproj.config_dir, STDOUT => :close)
17
+ assert Snapshot.update_log_available?(manifest)
18
+ end
19
+ it "returns true if the main configuration is managed by git and it is declared" do
20
+ manifest.main_package_set.vcs = VCSDefinition.from_raw('type' => 'git', 'url' => Autoproj.config_dir)
21
+ assert Snapshot.update_log_available?(manifest)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,30 @@
1
+ require 'autoproj/test'
2
+ require 'autoproj/autobuild'
3
+
4
+ describe Autobuild::Package do
5
+ describe "#remove_dependency" do
6
+ attr_reader :pkg
7
+ before do
8
+ @pkg = Autobuild.import('pkg')
9
+ Autobuild.import('dep')
10
+ end
11
+
12
+ it "removes direct dependencies" do
13
+ pkg.dependencies << 'dep'
14
+ pkg.remove_dependency 'dep'
15
+ assert !pkg.dependencies.include?('dep')
16
+ end
17
+
18
+ it "removes optional dependencies" do
19
+ pkg.optional_dependency 'dep'
20
+ pkg.remove_dependency 'dep'
21
+ assert !pkg.optional_dependencies.include?('dep')
22
+ end
23
+
24
+ it "removes OS dependencies" do
25
+ pkg.os_packages << 'dep'
26
+ pkg.remove_dependency 'dep'
27
+ assert !pkg.os_packages.include?('dep')
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,46 @@
1
+ require 'autoproj/test'
2
+ require 'fakefs/safe'
3
+
4
+ describe Autoproj::VCSDefinition do
5
+ describe ".vcs_definition_to_hash" do
6
+ before do
7
+ FakeFS.activate!
8
+ end
9
+
10
+ after do
11
+ FakeFS.deactivate!
12
+ FakeFS::FileSystem.clear
13
+ end
14
+
15
+ it "interprets plain strings as local directories" do
16
+ FileUtils.mkdir_p '/test'
17
+ vcs = Autoproj::VCSDefinition.from_raw('/test')
18
+ assert vcs.local?
19
+ assert_equal '/test', vcs.url
20
+ end
21
+
22
+ it "interprets the type:url shortcut" do
23
+ vcs = Autoproj::VCSDefinition.from_raw('git:git@github.com')
24
+ assert_equal 'git', vcs.type
25
+ assert_equal 'git@github.com', vcs.url
26
+ end
27
+
28
+ it "normalizes the standard format" do
29
+ vcs = Autoproj::VCSDefinition.from_raw(Hash['type' => 'git', 'url' => 'u', 'branch' => 'b'])
30
+ assert_equal 'git', vcs.type
31
+ assert_equal 'u', vcs.url
32
+ assert_equal 'b', vcs.options[:branch]
33
+ end
34
+ end
35
+
36
+ describe "#create_autobuild_importer" do
37
+ it "does not create an importer if type is none" do
38
+ vcs = Autoproj::VCSDefinition.from_raw(type: 'none', url: nil)
39
+ assert !vcs.create_autobuild_importer
40
+ end
41
+ it "does not create an importer if type is local" do
42
+ vcs = Autoproj::VCSDefinition.from_raw(type: 'local', url: '/test')
43
+ assert !vcs.create_autobuild_importer
44
+ end
45
+ end
46
+ end
metadata CHANGED
@@ -1,20 +1,23 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.7
4
+ version: 2.0.0.b1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rock Core Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2015-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ - - ">="
18
21
  - !ruby/object:Gem::Version
19
22
  version: 1.9.0
20
23
  type: :runtime
@@ -22,6 +25,9 @@ dependencies:
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.9'
30
+ - - ">="
25
31
  - !ruby/object:Gem::Version
26
32
  version: 1.9.0
27
33
  - !ruby/object:Gem::Dependency
@@ -29,6 +35,9 @@ dependencies:
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
37
  - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '2.0'
40
+ - - ">="
32
41
  - !ruby/object:Gem::Version
33
42
  version: 2.0.0
34
43
  type: :runtime
@@ -36,22 +45,31 @@ dependencies:
36
45
  version_requirements: !ruby/object:Gem::Requirement
37
46
  requirements:
38
47
  - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '2.0'
50
+ - - ">="
39
51
  - !ruby/object:Gem::Version
40
52
  version: 2.0.0
41
53
  - !ruby/object:Gem::Dependency
42
54
  name: highline
43
55
  requirement: !ruby/object:Gem::Requirement
44
56
  requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '1.7'
45
60
  - - ">="
46
61
  - !ruby/object:Gem::Version
47
- version: 1.5.0
62
+ version: 1.7.0
48
63
  type: :runtime
49
64
  prerelease: false
50
65
  version_requirements: !ruby/object:Gem::Requirement
51
66
  requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '1.7'
52
70
  - - ">="
53
71
  - !ruby/object:Gem::Version
54
- version: 1.5.0
72
+ version: 1.7.0
55
73
  - !ruby/object:Gem::Dependency
56
74
  name: rdoc
57
75
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +90,14 @@ dependencies:
72
90
  requirements:
73
91
  - - "~>"
74
92
  - !ruby/object:Gem::Version
75
- version: '3.14'
93
+ version: '3.13'
76
94
  type: :development
77
95
  prerelease: false
78
96
  version_requirements: !ruby/object:Gem::Requirement
79
97
  requirements:
80
98
  - - "~>"
81
99
  - !ruby/object:Gem::Version
82
- version: '3.14'
100
+ version: '3.13'
83
101
  description: autoproj is a manager for sets of software packages. It allows the user
84
102
  to import and build packages from source, still using the underlying distribution's
85
103
  native package manager for software that is available on it.
@@ -88,29 +106,9 @@ executables:
88
106
  - alocate
89
107
  - amake
90
108
  - aup
91
- - autolocate
92
109
  - autoproj
93
- - autoproj-bootstrap
94
- - autoproj-cache
95
- - autoproj-clean
96
- - autoproj-commit
97
- - autoproj-create-set
98
- - autoproj-doc
99
- - autoproj-envsh
100
- - autoproj-list
101
- - autoproj-locate
102
- - autoproj-log
103
- - autoproj-query
104
- - autoproj-reset
105
- - autoproj-show
106
- - autoproj-snapshot
107
- - autoproj-switch-config
108
- - autoproj-tag
109
- - autoproj-test
110
- - autoproj-versions
111
110
  - autoproj_bootstrap
112
111
  - autoproj_bootstrap.in
113
- - autoproj_stress_test
114
112
  extensions: []
115
113
  extra_rdoc_files:
116
114
  - History.txt
@@ -118,6 +116,7 @@ extra_rdoc_files:
118
116
  - README.md
119
117
  - samples/autoproj/README.txt
120
118
  files:
119
+ - ".gemtest"
121
120
  - History.txt
122
121
  - Manifest.txt
123
122
  - README.md
@@ -125,43 +124,43 @@ files:
125
124
  - bin/alocate
126
125
  - bin/amake
127
126
  - bin/aup
128
- - bin/autolocate
129
127
  - bin/autoproj
130
- - bin/autoproj-bootstrap
131
- - bin/autoproj-cache
132
- - bin/autoproj-clean
133
- - bin/autoproj-commit
134
- - bin/autoproj-create-set
135
- - bin/autoproj-doc
136
- - bin/autoproj-envsh
137
- - bin/autoproj-list
138
- - bin/autoproj-locate
139
- - bin/autoproj-log
140
- - bin/autoproj-query
141
- - bin/autoproj-reset
142
- - bin/autoproj-show
143
- - bin/autoproj-snapshot
144
- - bin/autoproj-switch-config
145
- - bin/autoproj-tag
146
- - bin/autoproj-test
147
- - bin/autoproj-versions
148
128
  - bin/autoproj_bootstrap
149
129
  - bin/autoproj_bootstrap.in
150
- - bin/autoproj_stress_test
151
130
  - lib/autoproj.rb
152
131
  - lib/autoproj/autobuild.rb
153
132
  - lib/autoproj/base.rb
154
133
  - lib/autoproj/build_option.rb
155
134
  - lib/autoproj/cli.rb
135
+ - lib/autoproj/cli/base.rb
136
+ - lib/autoproj/cli/bootstrap.rb
137
+ - lib/autoproj/cli/build.rb
138
+ - lib/autoproj/cli/cache.rb
139
+ - lib/autoproj/cli/clean.rb
140
+ - lib/autoproj/cli/commit.rb
141
+ - lib/autoproj/cli/doc.rb
142
+ - lib/autoproj/cli/envsh.rb
143
+ - lib/autoproj/cli/inspection_tool.rb
144
+ - lib/autoproj/cli/locate.rb
145
+ - lib/autoproj/cli/log.rb
146
+ - lib/autoproj/cli/main.rb
147
+ - lib/autoproj/cli/main_test.rb
148
+ - lib/autoproj/cli/osdeps.rb
149
+ - lib/autoproj/cli/query.rb
150
+ - lib/autoproj/cli/reconfigure.rb
156
151
  - lib/autoproj/cli/reset.rb
152
+ - lib/autoproj/cli/show.rb
157
153
  - lib/autoproj/cli/snapshot.rb
154
+ - lib/autoproj/cli/status.rb
155
+ - lib/autoproj/cli/switch_config.rb
158
156
  - lib/autoproj/cli/tag.rb
159
157
  - lib/autoproj/cli/test.rb
158
+ - lib/autoproj/cli/update.rb
160
159
  - lib/autoproj/cli/versions.rb
161
- - lib/autoproj/cmdline.rb
162
160
  - lib/autoproj/configuration.rb
163
161
  - lib/autoproj/default.osdeps
164
162
  - lib/autoproj/environment.rb
163
+ - lib/autoproj/exceptions.rb
165
164
  - lib/autoproj/gitorious.rb
166
165
  - lib/autoproj/installation_manifest.rb
167
166
  - lib/autoproj/manifest.rb
@@ -169,6 +168,7 @@ files:
169
168
  - lib/autoproj/ops/build.rb
170
169
  - lib/autoproj/ops/cache.rb
171
170
  - lib/autoproj/ops/configuration.rb
171
+ - lib/autoproj/ops/import.rb
172
172
  - lib/autoproj/ops/loader.rb
173
173
  - lib/autoproj/ops/main_config_switcher.rb
174
174
  - lib/autoproj/ops/snapshot.rb
@@ -180,6 +180,7 @@ files:
180
180
  - lib/autoproj/package_selection.rb
181
181
  - lib/autoproj/package_set.rb
182
182
  - lib/autoproj/query.rb
183
+ - lib/autoproj/reporter.rb
183
184
  - lib/autoproj/system.rb
184
185
  - lib/autoproj/templates/create-set/packages.autobuild
185
186
  - lib/autoproj/templates/create-set/source.yml
@@ -187,6 +188,7 @@ files:
187
188
  - lib/autoproj/variable_expansion.rb
188
189
  - lib/autoproj/vcs_definition.rb
189
190
  - lib/autoproj/version.rb
191
+ - lib/autoproj/workspace.rb
190
192
  - samples/autoproj/README.txt
191
193
  - samples/autoproj/init.rb
192
194
  - samples/autoproj/manifest
@@ -208,6 +210,7 @@ files:
208
210
  - test/data/test_manifest/autoproj/local_set/source.yml
209
211
  - test/data/test_manifest/autoproj/manifest
210
212
  - test/ops/test_configuration.rb
213
+ - test/ops/test_snapshot.rb
211
214
  - test/package_managers/apt-dpkg-status
212
215
  - test/package_managers/apt-dpkg-status.installed-last
213
216
  - test/package_managers/apt-dpkg-status.noninstalled-last
@@ -216,7 +219,9 @@ files:
216
219
  - test/package_managers/test_pip.rb
217
220
  - test/test_manifest.rb
218
221
  - test/test_os_dependencies.rb
222
+ - test/test_package.rb
219
223
  - test/test_package_manifest.rb
224
+ - test/test_vcs_definition.rb
220
225
  homepage: http://rock-robotics.org/documentation/autoproj
221
226
  licenses:
222
227
  - BSD
@@ -234,12 +239,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
239
  version: 1.9.2
235
240
  required_rubygems_version: !ruby/object:Gem::Requirement
236
241
  requirements:
237
- - - ">="
242
+ - - ">"
238
243
  - !ruby/object:Gem::Version
239
- version: '0'
244
+ version: 1.3.1
240
245
  requirements: []
241
246
  rubyforge_project:
242
- rubygems_version: 2.5.1
247
+ rubygems_version: 2.2.2
243
248
  signing_key:
244
249
  specification_version: 4
245
250
  summary: Easy installation and management of sets of software packages
@@ -1,3 +0,0 @@
1
- #! /usr/bin/env ruby
2
- load File.expand_path('autoproj-locate', File.dirname(__FILE__))
3
-
@@ -1,68 +0,0 @@
1
- #! /usr/bin/env ruby
2
- require 'autoproj'
3
- require 'autoproj/ops/main_config_switcher'
4
-
5
- root_dir = Dir.pwd
6
- if File.exists?(File.join(root_dir, 'autoproj', "manifest"))
7
- raise ConfigError.new, "this installation is already bootstrapped. Remove the autoproj directory if it is not the case"
8
- end
9
-
10
- Autoproj.root_dir = root_dir
11
- Autoproj.manifest = Autoproj::Manifest.new
12
- Ops::Tools.load_autoprojrc
13
- Autoproj.prepare_environment
14
-
15
- # Check if the .autoprojrc changed the PATH and therefore which autoproj script
16
- # should be executed ... and restart if it did
17
- autoproj_path = Autobuild.find_in_path('autoproj')
18
- if $0 != autoproj_path
19
- puts "your .autoprojrc file changed PATH in a way that requires the restart of autoproj"
20
-
21
- if ENV['AUTOPROJ_RESTARTING']
22
- puts "infinite loop detected, will not restart this time"
23
- else
24
- require 'rbconfig'
25
- exec(Autoproj.config.ruby_executable, autoproj_path, *Autoproj::CmdLine.argv)
26
- end
27
- end
28
-
29
- Autoproj::CmdLine.report do
30
- switcher = Autoproj::Ops::MainConfigSwitcher.new(root_dir)
31
- begin
32
- switcher.bootstrap(*ARGV)
33
- Autoproj.save_config
34
-
35
- STDERR.puts <<EOTEXT
36
-
37
-
38
- #{color('autoproj bootstrap successfully finished', :green, :bold)}
39
-
40
- #{color('To further use autoproj and the installed software', :bold)}, you
41
- must add the following line at the bottom of your .bashrc:
42
- source #{root_dir}/#{Autoproj::ENV_FILENAME}
43
-
44
- WARNING: autoproj will not work until your restart all
45
- your consoles, or run the following in them:
46
- $ source #{root_dir}/#{Autoproj::ENV_FILENAME}
47
-
48
- #{color('To import and build the packages', :bold)}, you can now run
49
- aup
50
- amake
51
-
52
- The resulting software is installed in
53
- #{root_dir}/install
54
-
55
- EOTEXT
56
-
57
- rescue RuntimeError
58
- STDERR.puts <<-EOTEXT
59
- #{color('autoproj bootstrap failed', :red, :bold)}
60
- To retry, first source the #{Autoproj::ENV_FILENAME} script with
61
- source #{root_dir}/#{Autoproj::ENV_FILENAME}
62
- and then re-run autoproj bootstrap
63
- autoproj bootstrap '#{ARGV.join("'")}'
64
- EOTEXT
65
-
66
- raise
67
- end
68
- end
@@ -1,18 +0,0 @@
1
- #! /usr/bin/env ruby
2
-
3
- require 'autoproj'
4
- require 'autoproj/ops/cache'
5
-
6
- root_dir = Autoproj::CmdLine.initialize_root_directory
7
-
8
- Autoproj::CmdLine.report do
9
- cache_dir, *_ =
10
- Autoproj.silent do
11
- Autoproj::CmdLine.initialize_and_load(ARGV)
12
- end
13
- cache_dir = File.expand_path(cache_dir, root_dir)
14
-
15
- cache_op = Autoproj::Ops::Cache.new(cache_dir, Autoproj.manifest)
16
- cache_op.create_or_update(Autobuild.ignore_errors)
17
- end
18
-