autoproj 1.12.4 → 1.12.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fa89159dba1e3e5b0b0172970d60c23d6164f21
4
- data.tar.gz: 0131d4b49f214fbd8df37f7383bdbb743266cac2
3
+ metadata.gz: de1b737b5a26bac3eafe2394e7a9d57032321935
4
+ data.tar.gz: c09ff63617a7bc670e9608c4d06a245cdd112ba6
5
5
  SHA512:
6
- metadata.gz: 2724ec5bfb1f6c088a11f04ceca2151d2d1e46df749c706ea2c38903eddcd8bee6e928c1d00abbe88dce1ea77e1acaa12e2891042202f44d6f5a41f3ffd848f4
7
- data.tar.gz: 1f86d09aa74d3680e4e632a159dadd31252e8966999b7bea0cdcc29ac997ba92609d848065579ccef15855693c626f1305b007f22619e1da4d214ed356a900de
6
+ metadata.gz: e4e68ed38d8a6b2588053fdb5bf38955600ebfeb825e3ab67d8834b37e1c21fb8723a503267c6c9400eb5f4a5a0f85838dfe6dd4f0656b4ccd3a84acad669b1e
7
+ data.tar.gz: 49c225e45df8256da2d3e90d1da139d4766be1e1d2454637a19b5e67991dff729968b83cd594fc99cd70f55cea93003937000986d22c61c9465baed342d64cf4
data/bin/autoproj CHANGED
@@ -75,7 +75,7 @@ Autoproj::CmdLine.report do
75
75
  exit 0
76
76
  end
77
77
  elsif selected_packages.empty?
78
- Autoproj::CmdLine.update_myself(force: true)
78
+ Autoproj::CmdLine.update_myself
79
79
  Autoproj::CmdLine.update_configuration
80
80
  else
81
81
  begin
data/bin/autoproj-show CHANGED
@@ -2,13 +2,6 @@
2
2
 
3
3
  require 'autoproj'
4
4
  require 'autoproj/cmdline'
5
- Autoproj.silent = true
6
- Autoproj::CmdLine.initialize_root_directory
7
- Autoproj::CmdLine.initialize_and_load(ARGV)
8
-
9
- require 'pp'
10
- default_packages = Autoproj.manifest.default_packages
11
- revdeps = Autoproj.manifest.compute_revdeps
12
5
 
13
6
  user_selection = ARGV.map do |arg|
14
7
  if File.directory?(arg)
@@ -16,6 +9,14 @@ user_selection = ARGV.map do |arg|
16
9
  else arg
17
10
  end
18
11
  end
12
+
13
+ Autoproj.silent = true
14
+ Autoproj::CmdLine.initialize_root_directory
15
+ Autoproj::CmdLine.initialize_and_load(ARGV)
16
+
17
+ default_packages = Autoproj.manifest.default_packages
18
+ revdeps = Autoproj.manifest.compute_revdeps
19
+
19
20
  resolved_selection = Autoproj::CmdLine.resolve_user_selection(user_selection, :filter => false)
20
21
  packages = resolved_selection.selection.keys
21
22
 
@@ -1006,6 +1006,26 @@ fi
1006
1006
 
1007
1007
  # Now, reset the directories in our own RubyGems instance
1008
1008
  Gem.paths = ENV
1009
+
1010
+ # If there is a cache directory, make sure .gems/cache points to
1011
+ # it (there are no programmatic ways to override this)
1012
+ if cache = cache_dir
1013
+ gem_cache_dir = File.join(gem_home, 'cache')
1014
+ if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
1015
+ FileUtils.rm_rf gem_cache_dir
1016
+ Autoproj.create_symlink(cache, gem_cache_dir)
1017
+ end
1018
+ end
1019
+ end
1020
+
1021
+ # A global cache directory that should be used to avoid
1022
+ # re-downloading gems
1023
+ def self.cache_dir
1024
+ if dir = ENV['AUTOBUILD_CACHE_DIR']
1025
+ dir = File.join(dir, 'gems')
1026
+ FileUtils.mkdir_p dir
1027
+ dir
1028
+ end
1009
1029
  end
1010
1030
 
1011
1031
  # Return the directory in which RubyGems package should be installed
@@ -799,7 +799,6 @@ module Autoproj
799
799
  end
800
800
  def self.display_configuration?; !!@display_configuration end
801
801
  def self.force_re_build_with_depends?; !!@force_re_build_with_depends end
802
- def self.partial_build?; !!@partial_build end
803
802
  def self.mail_config; @mail_config || Hash.new end
804
803
  def self.update_packages?; @mode == "update" || @mode == "envsh" || build? end
805
804
  def self.update_envsh?; @mode == "envsh" || build? || @mode == "update" end
@@ -847,7 +846,6 @@ module Autoproj
847
846
  @force_re_build_with_depends = false
848
847
  force_re_build_with_depends = nil
849
848
  @only_config = false
850
- @partial_build = false
851
849
  @color = true
852
850
  Autobuild.color = true
853
851
  Autobuild.do_update = nil
@@ -1055,7 +1053,6 @@ where 'mode' is one of:
1055
1053
  end
1056
1054
 
1057
1055
  selection = args.dup
1058
- @partial_build = !selection.empty?
1059
1056
  @force_re_build_with_depends = force_re_build_with_depends if !force_re_build_with_depends.nil?
1060
1057
  Autobuild.do_update = do_update if !do_update.nil?
1061
1058
  selection
@@ -89,7 +89,7 @@ module Autoproj
89
89
 
90
90
  # Then move the importer there if possible
91
91
  if fake_package.importer.respond_to?(:pick_from_autoproj_root)
92
- if !fake_package.importer.pick_from_autoproj_root(fake_package, other_root)
92
+ if !fake_package.importer.pick_from_autoproj_root(fake_package, update_from)
93
93
  fake_package.update = false
94
94
  end
95
95
  else
@@ -187,6 +187,10 @@ module Autoproj
187
187
  end
188
188
 
189
189
  def repository_id_of(vcs)
190
+ if vcs.local?
191
+ return "local:#{vcs.url}"
192
+ end
193
+
190
194
  name = PackageSet.name_of(manifest, vcs)
191
195
  raw_local_dir = PackageSet.raw_local_dir_of(vcs)
192
196
  fake_package = Tools.create_autobuild_package(vcs, name, raw_local_dir)
@@ -289,9 +293,12 @@ module Autoproj
289
293
  # We do not consider the 'standalone' package sets while sorting.
290
294
  # They are taken care of later, as we need to maintain the order the
291
295
  # user defined in the package_sets section of the manifest
292
- queue = package_sets.find_all do |pkg_set|
293
- (!pkg_set.imports.empty? || !pkg_set.explicit?) && !(pkg_set == root_pkg_set)
294
- end
296
+ queue = package_sets.flat_map do |pkg_set|
297
+ if (!pkg_set.imports.empty? || !pkg_set.explicit?) && !(pkg_set == root_pkg_set)
298
+ [pkg_set] + pkg_set.imports.to_a
299
+ else []
300
+ end
301
+ end.to_set.to_a
295
302
 
296
303
  sorted = Array.new
297
304
  while !queue.empty?
@@ -543,6 +543,26 @@ fi
543
543
 
544
544
  # Now, reset the directories in our own RubyGems instance
545
545
  Gem.paths = ENV
546
+
547
+ # If there is a cache directory, make sure .gems/cache points to
548
+ # it (there are no programmatic ways to override this)
549
+ if cache = cache_dir
550
+ gem_cache_dir = File.join(gem_home, 'cache')
551
+ if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
552
+ FileUtils.rm_rf gem_cache_dir
553
+ Autoproj.create_symlink(cache, gem_cache_dir)
554
+ end
555
+ end
556
+ end
557
+
558
+ # A global cache directory that should be used to avoid
559
+ # re-downloading gems
560
+ def self.cache_dir
561
+ if dir = ENV['AUTOBUILD_CACHE_DIR']
562
+ dir = File.join(dir, 'gems')
563
+ FileUtils.mkdir_p dir
564
+ dir
565
+ end
546
566
  end
547
567
 
548
568
  # Return the directory in which RubyGems package should be installed
@@ -332,9 +332,9 @@ module Autoproj
332
332
  @name = source_definition['name']
333
333
  @provides = (source_definition['provides'] || Set.new).to_set
334
334
  @imports_vcs = Array(source_definition['imports'] || Array.new).map do |set_def|
335
- if !set_def.kind_of?(Hash)
335
+ if !set_def.kind_of?(Hash) && !set_def.respond_to?(:to_str)
336
336
  raise ConfigError.new(source_file),
337
- "in #{source_file}: wrong format for 'imports' section. Expected an array of maps (e.g. - github: my/url)."
337
+ "in #{source_file}: wrong format for 'imports' section. Expected an array of maps or strings (e.g. - github: my/url)."
338
338
  end
339
339
 
340
340
  Autoproj.in_file(source_file) do
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.12.4"
2
+ VERSION = "1.12.5"
3
3
  end
@@ -0,0 +1,20 @@
1
+ require 'autoproj/test'
2
+ require 'autoproj/ops/configuration'
3
+
4
+ describe Autoproj::Ops::Configuration do
5
+ describe "#sort_package_sets_by_import_order" do
6
+ attr_reader :ops
7
+
8
+ before do
9
+ @ops = Autoproj::Ops::Configuration.new(nil, nil)
10
+ end
11
+
12
+ it "should handle standalone package sets that are both explicit and dependencies of other package sets gracefully (issue#30)" do
13
+ pkg_set0 = flexmock('set0', imports: [], explicit?: true)
14
+ pkg_set1 = flexmock('set1', imports: [pkg_set0], explicit?: true)
15
+ root_pkg_set = flexmock('root', imports: [pkg_set0, pkg_set1], explicit?: true)
16
+ assert_equal [pkg_set0, pkg_set1, root_pkg_set],
17
+ ops.sort_package_sets_by_import_order([pkg_set1, pkg_set0], root_pkg_set)
18
+ end
19
+ end
20
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.4
4
+ version: 1.12.5
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: 2014-11-24 00:00:00.000000000 Z
11
+ date: 2014-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild
@@ -190,6 +190,7 @@ files:
190
190
  - test/data/test_manifest/autoproj/local_set/local.autobuild
191
191
  - test/data/test_manifest/autoproj/local_set/source.yml
192
192
  - test/data/test_manifest/autoproj/manifest
193
+ - test/ops/test_configuration.rb
193
194
  - test/package_managers/apt-dpkg-status
194
195
  - test/package_managers/apt-dpkg-status.installed-last
195
196
  - test/package_managers/apt-dpkg-status.noninstalled-last
@@ -230,5 +231,6 @@ test_files:
230
231
  - test/package_managers/test_gem.rb
231
232
  - test/package_managers/test_pip.rb
232
233
  - test/test_manifest.rb
233
- - test/test_os_dependencies.rb
234
234
  - test/test_package_manifest.rb
235
+ - test/test_os_dependencies.rb
236
+ - test/ops/test_configuration.rb