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 +4 -4
- data/bin/autoproj +1 -1
- data/bin/autoproj-show +8 -7
- data/bin/autoproj_bootstrap +20 -0
- data/lib/autoproj/cmdline.rb +0 -3
- data/lib/autoproj/ops/configuration.rb +11 -4
- data/lib/autoproj/osdeps.rb +20 -0
- data/lib/autoproj/package_set.rb +2 -2
- data/lib/autoproj/version.rb +1 -1
- data/test/ops/test_configuration.rb +20 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de1b737b5a26bac3eafe2394e7a9d57032321935
|
4
|
+
data.tar.gz: c09ff63617a7bc670e9608c4d06a245cdd112ba6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4e68ed38d8a6b2588053fdb5bf38955600ebfeb825e3ab67d8834b37e1c21fb8723a503267c6c9400eb5f4a5a0f85838dfe6dd4f0656b4ccd3a84acad669b1e
|
7
|
+
data.tar.gz: 49c225e45df8256da2d3e90d1da139d4766be1e1d2454637a19b5e67991dff729968b83cd594fc99cd70f55cea93003937000986d22c61c9465baed342d64cf4
|
data/bin/autoproj
CHANGED
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
|
|
data/bin/autoproj_bootstrap
CHANGED
@@ -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
|
data/lib/autoproj/cmdline.rb
CHANGED
@@ -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,
|
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.
|
293
|
-
(!pkg_set.imports.empty? || !pkg_set.explicit?) && !(pkg_set == root_pkg_set)
|
294
|
-
|
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?
|
data/lib/autoproj/osdeps.rb
CHANGED
@@ -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
|
data/lib/autoproj/package_set.rb
CHANGED
@@ -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
|
data/lib/autoproj/version.rb
CHANGED
@@ -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
|
+
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
|
+
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
|