autoproj 1.7.0.rc2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. data/History.txt +29 -20
  2. data/Manifest.txt +2 -29
  3. data/Rakefile +7 -28
  4. data/bin/autolocate +9 -37
  5. data/{doc/guide/src → bin}/autoproj_bootstrap +36 -0
  6. data/bin/autoproj_stress_test +40 -0
  7. data/lib/autoproj/cmdline.rb +22 -3
  8. data/lib/autoproj/manifest.rb +0 -2
  9. data/lib/autoproj/version.rb +1 -1
  10. metadata +12 -40
  11. data/doc/guide/config.yaml +0 -29
  12. data/doc/guide/ext/init.rb +0 -18
  13. data/doc/guide/ext/previous_next.rb +0 -40
  14. data/doc/guide/ext/rdoc_links.rb +0 -33
  15. data/doc/guide/src/adding_packages.page +0 -40
  16. data/doc/guide/src/customization.page +0 -230
  17. data/doc/guide/src/default.css +0 -340
  18. data/doc/guide/src/default.template +0 -74
  19. data/doc/guide/src/error_messages.page +0 -37
  20. data/doc/guide/src/htmldoc.metainfo +0 -8
  21. data/doc/guide/src/htmldoc.virtual +0 -19
  22. data/doc/guide/src/images/bodybg.png +0 -0
  23. data/doc/guide/src/images/contbg.png +0 -0
  24. data/doc/guide/src/images/footerbg.png +0 -0
  25. data/doc/guide/src/images/gradient1.png +0 -0
  26. data/doc/guide/src/images/gradient2.png +0 -0
  27. data/doc/guide/src/index.page +0 -64
  28. data/doc/guide/src/manifest.xml +0 -14
  29. data/doc/guide/src/overview.png +0 -0
  30. data/doc/guide/src/overview.svg +0 -537
  31. data/doc/guide/src/package_sets/autobuild.page +0 -239
  32. data/doc/guide/src/package_sets/importers.page +0 -165
  33. data/doc/guide/src/package_sets/index.page +0 -223
  34. data/doc/guide/src/package_sets/manifest-xml.page +0 -29
  35. data/doc/guide/src/package_sets/osdeps.page +0 -128
  36. data/doc/guide/src/quick_start.page +0 -128
  37. data/doc/guide/src/toc.page +0 -7
  38. data/doc/guide/src/writing_manifest.page +0 -146
data/History.txt CHANGED
@@ -1,30 +1,39 @@
1
1
  = Version 1.7.0
2
2
  * 1.6.2 should have been 1.7.0. Bump it now.
3
+ == For basic use
4
+ * removed some OS dependency updates that should not be there. In practice, it
5
+ means that build and fast-build will generally be a lot faster
6
+ * The shell function "acd", akin to rosbuild's roscd, is also provided for
7
+ recognized shells (bash and zsh at the moment). The relevant files are
8
+ sourced in env.sh if the user's shell is compatible
9
+ See http://rock-robotics.org/quick_start.html#shell_helpers
10
+ * added an easier way to add a local checked-out package to a build without
11
+ going through editing 20 files. Packages are automatically detected and added
12
+ to the build as soon as their path, relative to the root dir, are explicitely
13
+ listed in autoproj/manifest.
14
+ See http://rock-robotics.org/autoproj/autoproj/adding_packages.html
15
+ * added the --stats option that displays timing statistics about the build.
16
+ Raw statistics are always saved in install/log/stats.log
17
+ == For advanced use
3
18
  * introduced cross-package-set imports. A package set can now tell autoproj to
4
- install another one in a recursive manner (see user's guide)
5
- * added optional dependencies, which will not be considered if the
6
- depended-upon package is either not existing or is explicitely excluded from
7
- the build. It is specified in Ruby with
8
- pkg.optional_dependency pkg_name
9
- or in the package's manifest.xml files by setting the "optional" attribute to 1:
10
- <depend package="pkg_name" optional="1" />
11
-
19
+ install another one in a recursive manner
20
+ See http://rock-robotics.org/autoproj/advanced/cross_set_dependencies.html
21
+ * added optional dependencies, which will not be considered if the depended-
22
+ upon package is either not existing or is explicitely excluded from the build.
23
+ See http://rock-robotics.org/autoproj/advanced/package_dependencies.html
12
24
  * added the #package toplevel method to get a package handle, i.e.
13
25
  package('orocos/rtt')
14
26
  is equivalent to the former
15
27
  Autobuild::Package['orocos/rtt']
16
- * added the --randomize-layout option which makes autoproj build each package
17
- in a separate non-trivial subfolder, and install it in a separate folder as
18
- well. This is meant to test the definition and handling of dependencies
19
- between the different packages.
20
- * added the autolocate tool, which returns the full path to a certain package.
21
- The shell function "acd", akin to rosbuild's roscd, is also provided for
22
- recognized shells (bash and zsh at the moment). The relevant files are
23
- sourced in env.sh
24
- * added an easier way to add a local checked-out package to a build without
25
- going through editing 20 files. Packages are automatically detected and added
26
- as soon as they are explicitely listed in autoproj/manifest.
27
- * added the --stats option that displays timing statistics about the build
28
+ * added tools to test the build configuration on build servers.
29
+ - the --randomize-layout option which makes autoproj build each package
30
+ in a separate non-trivial subfolder, and install it in a separate folder as
31
+ well. This is meant to test the definition and handling of dependencies
32
+ between the different packages.
33
+ - the autoproj_stress_test script clears the layout and adds packages one by
34
+ one in a random order, testing at each step if the resulting configuration
35
+ works fine. It turns on --randomize-layout as well.
36
+ * "acd" is using the autolocate tool, which returns the full path to a certain package.
28
37
 
29
38
  = Version 1.6.2
30
39
  * overhauled osdeps fine-grained configuration. See
data/Manifest.txt CHANGED
@@ -4,35 +4,8 @@ README.txt
4
4
  Rakefile
5
5
  bin/autolocate
6
6
  bin/autoproj
7
- doc/guide/config.yaml
8
- doc/guide/ext/init.rb
9
- doc/guide/ext/previous_next.rb
10
- doc/guide/ext/rdoc_links.rb
11
- doc/guide/src/adding_packages.page
12
- doc/guide/src/autoproj_bootstrap
13
- doc/guide/src/customization.page
14
- doc/guide/src/default.css
15
- doc/guide/src/default.template
16
- doc/guide/src/error_messages.page
17
- doc/guide/src/htmldoc.metainfo
18
- doc/guide/src/htmldoc.virtual
19
- doc/guide/src/images/bodybg.png
20
- doc/guide/src/images/contbg.png
21
- doc/guide/src/images/footerbg.png
22
- doc/guide/src/images/gradient1.png
23
- doc/guide/src/images/gradient2.png
24
- doc/guide/src/index.page
25
- doc/guide/src/manifest.xml
26
- doc/guide/src/overview.png
27
- doc/guide/src/overview.svg
28
- doc/guide/src/package_sets/autobuild.page
29
- doc/guide/src/package_sets/importers.page
30
- doc/guide/src/package_sets/index.page
31
- doc/guide/src/package_sets/manifest-xml.page
32
- doc/guide/src/package_sets/osdeps.page
33
- doc/guide/src/quick_start.page
34
- doc/guide/src/toc.page
35
- doc/guide/src/writing_manifest.page
7
+ bin/autoproj_bootstrap
8
+ bin/autoproj_stress_test
36
9
  lib/autoproj.rb
37
10
  lib/autoproj/autobuild.rb
38
11
  lib/autoproj/base.rb
data/Rakefile CHANGED
@@ -26,10 +26,6 @@ begin
26
26
  end
27
27
  end
28
28
 
29
- # Define our own documentation handling. Rake.clear_tasks is defined by Hoe
30
- Rake.clear_tasks(/dist:(re|clobber_|)docs/)
31
- Rake.clear_tasks(/dist:publish_docs/)
32
-
33
29
  rescue LoadError
34
30
  STDERR.puts "cannot load the Hoe gem. Distribution is disabled"
35
31
  rescue Exception => e
@@ -38,15 +34,6 @@ rescue Exception => e
38
34
  end
39
35
 
40
36
  namespace 'dist' do
41
- task 'publish_docs' => 'doc' do
42
- if !system('doc/update_github')
43
- raise "cannot update the gh-pages branch for GitHub"
44
- end
45
- if !system('git', 'push', 'origin', '+gh-pages')
46
- raise "cannot push the documentation"
47
- end
48
- end
49
-
50
37
  desc "generate the bootstrap script"
51
38
  task 'bootstrap' do
52
39
  require 'yaml'
@@ -72,19 +59,19 @@ namespace 'dist' do
72
59
  gsub('OPTIONS_CODE', options_code).
73
60
  gsub('SYSTEM_CODE', system_code).
74
61
  gsub('OSDEPS_DEFAULTS', osdeps_defaults)
75
- File.open(File.join(Dir.pwd, 'doc', 'guide', 'src', 'autoproj_bootstrap'), 'w') do |io|
62
+ File.open(File.join(Dir.pwd, 'bin', 'autoproj_bootstrap'), 'w') do |io|
76
63
  io.write bootstrap_code
77
64
  end
78
65
  end
79
66
  end
67
+ file 'bin/autoproj_bootstrap' => 'dist:bootstrap'
80
68
 
81
69
  do_doc = begin
82
- require 'webgen/webgentask'
83
70
  require 'rdoc/task'
84
71
  true
85
72
  rescue LoadError => e
86
- STDERR.puts "ERROR: cannot load webgen and/or RDoc, documentation generation disabled"
87
- STDERR.puts "ERROR: #{e.message}"
73
+ STDERR.puts "WARN: cannot load RDoc, documentation generation disabled"
74
+ STDERR.puts "WARN: #{e.message}"
88
75
  end
89
76
 
90
77
  if do_doc
@@ -96,18 +83,10 @@ if do_doc
96
83
  end
97
84
 
98
85
  namespace 'doc' do
99
- task 'all' => %w{guide api}
100
- task 'clobber' => 'clobber_guide'
101
- Webgen::WebgenTask.new('guide') do |website|
102
- website.clobber_outdir = true
103
- website.directory = File.join(Dir.pwd, 'doc', 'guide')
104
- website.config_block = lambda do |config|
105
- config['output'] = ['Webgen::Output::FileSystem', File.join(Dir.pwd, 'doc', 'html')]
106
- end
107
- end
108
- task 'guide' => 'dist:bootstrap'
86
+ task 'all' => %w{api}
87
+ task 'clobber' => 'clobber_api'
109
88
  RDoc::Task.new("api") do |rdoc|
110
- rdoc.rdoc_dir = 'doc/html/api'
89
+ rdoc.rdoc_dir = 'doc'
111
90
  rdoc.title = "autoproj"
112
91
  rdoc.options << '--show-hash'
113
92
  rdoc.rdoc_files.include('lib/**/*.rb')
data/bin/autolocate CHANGED
@@ -1,47 +1,19 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
- require "enumerator"
4
- require 'autobuild'
5
- require 'autobuild/reporting'
6
- require 'autoproj/autobuild'
7
- require 'autoproj/base'
8
- require 'autoproj/version'
9
- require 'autoproj/manifest'
10
- require 'autoproj/osdeps'
11
- require 'autoproj/system'
12
- require 'autoproj/options'
3
+ require 'autoproj'
13
4
  require 'autoproj/cmdline'
14
- require 'logger'
15
- require 'utilrb/logger'
16
-
17
- include Autoproj
18
-
19
- root_dir =
20
- begin Autoproj.root_dir
21
- rescue UserError => error
22
- if ENV['GEM_HOME']
23
- Dir.chdir(File.join(ENV['GEM_HOME'], '..'))
24
- begin Autoproj.root_dir
25
- rescue UserError
26
- raise error
27
- end
28
- else
29
- raise
30
- end
31
- end
32
5
 
33
6
  Autoproj.silent = true
34
- selection = Autoproj::CmdLine.parse_arguments(ARGV, false).first
35
- if !selection
36
- STDERR.puts Autoproj.console.color("no package name given on the command line", :bold, :red)
7
+ root_dir = Autoproj::CmdLine.initialize_root_directory
8
+ selection = Autoproj::CmdLine.initialize_and_load(ARGV)
9
+ if selection.empty?
10
+ puts root_dir
11
+ exit 0
12
+ elsif selection.size > 1
13
+ STDERR.puts Autoproj.console.color("more than one name given on the command line", :red)
37
14
  exit 1
38
15
  end
39
-
40
- Autoproj::CmdLine.update_os_dependencies = false
41
- Dir.chdir(Autoproj.root_dir)
42
- Autoproj::CmdLine.initialize
43
- Autoproj::CmdLine.load_configuration
44
- Autoproj::CmdLine.initial_package_setup
16
+ selection = selection.first
45
17
 
46
18
  selection_rx = Regexp.new(Regexp.quote(selection))
47
19
  candidates = []
@@ -146,6 +146,9 @@ module Autoproj
146
146
 
147
147
  # The information contained in the OSdeps files, as a hash
148
148
  attr_reader :definitions
149
+ # All the information contained in all the OSdeps files, as a mapping
150
+ # from the OSdeps package name to [osdeps_file, definition] pairs
151
+ attr_reader :all_definitions
149
152
  # The information as to from which osdeps file the current package
150
153
  # information in +definitions+ originates. It is a mapping from the
151
154
  # package name to the osdeps file' full path
@@ -163,11 +166,14 @@ module Autoproj
163
166
 
164
167
  def initialize(defs = Hash.new, file = nil)
165
168
  @definitions = defs.to_hash
169
+ @all_definitions = Hash.new { |h, k| h[k] = Array.new }
170
+
166
171
  @sources = Hash.new
167
172
  @installed_packages = Array.new
168
173
  if file
169
174
  defs.each_key do |package_name|
170
175
  sources[package_name] = file
176
+ all_definitions[package_name] << [[file], defs[package_name]]
171
177
  end
172
178
  end
173
179
  @silent = true
@@ -195,6 +201,16 @@ module Autoproj
195
201
  v2
196
202
  end
197
203
  @sources = sources.merge(info.sources)
204
+ @all_definitions = all_definitions.merge(info.all_definitions) do |package_name, all_defs, new_all_defs|
205
+ all_defs = all_defs.dup
206
+ new_all_defs = new_all_defs.dup
207
+ new_all_defs.delete_if do |files, data|
208
+ if entry = all_defs.find { |_, d| d == data }
209
+ entry[0] |= files
210
+ end
211
+ end
212
+ all_defs.concat(new_all_defs)
213
+ end
198
214
  end
199
215
 
200
216
  # Perform some sanity checks on the given osdeps definitions
@@ -1241,6 +1257,12 @@ module Autoproj
1241
1257
  Autoproj.env_set 'LD_LIBRARY_PATH'
1242
1258
  end
1243
1259
 
1260
+ class << self
1261
+ attr_writer :shell_helpers
1262
+ def shell_helpers?; !!@shell_helpers end
1263
+ end
1264
+ @shell_helpers = true
1265
+
1244
1266
  # Create the env.sh script in +subdir+. In general, +subdir+ should be nil.
1245
1267
  def self.export_env_sh(subdir = nil)
1246
1268
  filename = if subdir
@@ -1266,6 +1288,20 @@ module Autoproj
1266
1288
  variables.each do |var|
1267
1289
  io.puts "export #{var}"
1268
1290
  end
1291
+
1292
+ shell_dir = File.expand_path(File.join("..", "..", "shell"), File.dirname(__FILE__))
1293
+ if Autoproj.shell_helpers? && shell = ENV['SHELL']
1294
+ shell_kind = File.basename(shell)
1295
+ if shell_kind =~ /^\w+$/
1296
+ shell_file = File.join(shell_dir, "autoproj_#{shell_kind}")
1297
+ if File.exists?(shell_file)
1298
+ Autoproj.progress
1299
+ Autoproj.progress "autodetected the shell to be #{shell_kind}, sourcing autoproj shell helpers"
1300
+ Autoproj.progress "add \"Autoproj.shell_helpers = false\" in autoproj/init.rb to disable"
1301
+ io.puts "source \"#{shell_file}\""
1302
+ end
1303
+ end
1304
+ end
1269
1305
  end
1270
1306
  end
1271
1307
 
@@ -0,0 +1,40 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'autoproj'
4
+ require 'autoproj/cmdline'
5
+
6
+ root_dir = Autoproj::CmdLine.initialize_root_directory
7
+ Autoproj::CmdLine.initialize_and_load([])
8
+ manifest = Autoproj.manifest
9
+
10
+ manifest_path = File.join(Autoproj.config_dir, 'manifest')
11
+ manifest_data = YAML.load(File.read(manifest_path))
12
+ manifest_data['layout'] = Array.new
13
+
14
+ packages = manifest.each_package.map(&:name)
15
+
16
+ while !packages.empty?
17
+ pkg = packages[rand(packages.size)]
18
+ next if !pkg
19
+ packages.delete(pkg)
20
+
21
+ manifest_data['layout'] << pkg
22
+ File.open(manifest_path, 'w') do |io|
23
+ io.write YAML.dump(manifest_data)
24
+ end
25
+
26
+ STDERR.puts
27
+ STDERR.puts
28
+ STDERR.puts
29
+ STDERR.puts "=================================================="
30
+ STDERR.puts "==== added #{pkg}"
31
+ if !system('autoproj', 'full-build', '--randomize-layout', pkg)
32
+ File.open(File.join(root_dir, 'failures.txt'), 'a') do |io|
33
+ io.puts "the following layout failed:"
34
+ io.puts " - " + manifest_data['layout'].join("\n - ")
35
+ end
36
+ STDERR.puts "the following layout failed:"
37
+ STDERR.puts " - " + manifest_data['layout'].join("\n - ")
38
+ end
39
+ end
40
+
@@ -97,6 +97,9 @@ module Autoproj
97
97
  if Autobuild.do_update.nil?
98
98
  Autobuild.do_update = manifest.auto_update?
99
99
  end
100
+ if @update_os_dependencies.nil?
101
+ @update_os_dependencies = manifest.auto_update?
102
+ end
100
103
 
101
104
  # Initialize the Autoproj.osdeps object by loading the default. The
102
105
  # rest is loaded later
@@ -745,7 +748,7 @@ where 'mode' is one of:
745
748
  Autoproj.reconfigure = true
746
749
  end
747
750
  opts.on("--version", "displays the version and then exits") do
748
- STDERR.puts "autoproj v#{Autoproj::VERSION}"
751
+ puts "autoproj v#{Autoproj::VERSION}"
749
752
  exit(0)
750
753
  end
751
754
  opts.on("--[no-]update", "[do not] update already checked-out packages (build modes only)") do |value|
@@ -1512,12 +1515,13 @@ export PATH=$GEM_HOME/bin:$PATH
1512
1515
  # initialize an autoproj environment for standalone tools
1513
1516
  #
1514
1517
  # Beware, it changes the current directory to the autoproj root dir
1515
- def self.initialize_and_load
1518
+ def self.initialize_and_load(cmdline_arguments = ARGV.dup)
1516
1519
  require 'autoproj/autobuild'
1517
1520
  require 'open-uri'
1518
1521
  require 'autoproj/cmdline'
1519
1522
 
1520
- Autoproj::CmdLine.parse_arguments(ARGV.dup, false)
1523
+ remaining_arguments = Autoproj::CmdLine.
1524
+ parse_arguments(cmdline_arguments, false)
1521
1525
  Dir.chdir(Autoproj.root_dir)
1522
1526
 
1523
1527
  Autoproj::CmdLine.update_os_dependencies = false
@@ -1532,6 +1536,21 @@ export PATH=$GEM_HOME/bin:$PATH
1532
1536
  manifest.load_package_manifest(pkg.autobuild.name)
1533
1537
  end
1534
1538
  end
1539
+ remaining_arguments
1540
+ end
1541
+
1542
+ def self.initialize_root_directory
1543
+ Autoproj.root_dir
1544
+ rescue Autoproj::UserError => error
1545
+ if ENV['GEM_HOME']
1546
+ Dir.chdir(File.join(ENV['GEM_HOME'], '..'))
1547
+ begin Autoproj.root_dir
1548
+ rescue Autoproj::UserError
1549
+ raise error
1550
+ end
1551
+ else
1552
+ raise
1553
+ end
1535
1554
  end
1536
1555
  end
1537
1556
  end
@@ -800,8 +800,6 @@ module Autoproj
800
800
  @disabled_imports = Set.new
801
801
  @moved_packages = Hash.new
802
802
 
803
- @explicit_selection = Set.new
804
-
805
803
  @constant_definitions = Hash.new
806
804
  if Autoproj.has_config_key?('manifest_source')
807
805
  @vcs = Autoproj.normalize_vcs_definition(Autoproj.user_config('manifest_source'))
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.7.0.rc2"
2
+ VERSION = "1.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- hash: 977940583
5
- prerelease: true
4
+ hash: 11
5
+ prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
9
  - 0
10
- - rc2
11
- version: 1.7.0.rc2
10
+ version: 1.7.0
12
11
  platform: ruby
13
12
  authors:
14
13
  - Sylvain Joyeux
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2010-12-01 00:00:00 +01:00
18
+ date: 2010-12-06 00:00:00 +01:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -193,6 +192,8 @@ email:
193
192
  executables:
194
193
  - autolocate
195
194
  - autoproj
195
+ - autoproj_bootstrap
196
+ - autoproj_stress_test
196
197
  extensions: []
197
198
 
198
199
  extra_rdoc_files:
@@ -207,35 +208,8 @@ files:
207
208
  - Rakefile
208
209
  - bin/autolocate
209
210
  - bin/autoproj
210
- - doc/guide/config.yaml
211
- - doc/guide/ext/init.rb
212
- - doc/guide/ext/previous_next.rb
213
- - doc/guide/ext/rdoc_links.rb
214
- - doc/guide/src/adding_packages.page
215
- - doc/guide/src/autoproj_bootstrap
216
- - doc/guide/src/customization.page
217
- - doc/guide/src/default.css
218
- - doc/guide/src/default.template
219
- - doc/guide/src/error_messages.page
220
- - doc/guide/src/htmldoc.metainfo
221
- - doc/guide/src/htmldoc.virtual
222
- - doc/guide/src/images/bodybg.png
223
- - doc/guide/src/images/contbg.png
224
- - doc/guide/src/images/footerbg.png
225
- - doc/guide/src/images/gradient1.png
226
- - doc/guide/src/images/gradient2.png
227
- - doc/guide/src/index.page
228
- - doc/guide/src/manifest.xml
229
- - doc/guide/src/overview.png
230
- - doc/guide/src/overview.svg
231
- - doc/guide/src/package_sets/autobuild.page
232
- - doc/guide/src/package_sets/importers.page
233
- - doc/guide/src/package_sets/index.page
234
- - doc/guide/src/package_sets/manifest-xml.page
235
- - doc/guide/src/package_sets/osdeps.page
236
- - doc/guide/src/quick_start.page
237
- - doc/guide/src/toc.page
238
- - doc/guide/src/writing_manifest.page
211
+ - bin/autoproj_bootstrap
212
+ - bin/autoproj_stress_test
239
213
  - lib/autoproj.rb
240
214
  - lib/autoproj/autobuild.rb
241
215
  - lib/autoproj/base.rb
@@ -281,14 +255,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
255
  required_rubygems_version: !ruby/object:Gem::Requirement
282
256
  none: false
283
257
  requirements:
284
- - - ">"
258
+ - - ">="
285
259
  - !ruby/object:Gem::Version
286
- hash: 25
260
+ hash: 3
287
261
  segments:
288
- - 1
289
- - 3
290
- - 1
291
- version: 1.3.1
262
+ - 0
263
+ version: "0"
292
264
  requirements: []
293
265
 
294
266
  rubyforge_project: autobuild