autoproj 1.9.7.rc1 → 1.9.7.rc2

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,6 +4,20 @@ require 'autoproj'
4
4
 
5
5
  root_dir = Autoproj::CmdLine.initialize_root_directory
6
6
 
7
+ def with_retry(count)
8
+ (count + 1).times do |i|
9
+ begin
10
+ break yield
11
+ rescue Autobuild::SubcommandFailed
12
+ if i == count
13
+ raise
14
+ else
15
+ Autobuild.message " failed, retrying (#{i}/#{count})"
16
+ end
17
+ end
18
+ end
19
+ end
20
+
7
21
  Autoproj::CmdLine.report do
8
22
  cache_dir, *_ =
9
23
  Autoproj.silent do
@@ -43,11 +57,16 @@ Autoproj::CmdLine.report do
43
57
  remote_name = pkg.name.gsub(/[^\w]/, '_')
44
58
  pkg.importer.remote_name = remote_name
45
59
  pkg.importer.update_remotes_configuration(pkg, 'autoproj-cache')
46
- Autobuild::Subprocess.run('autoproj-cache', :import, Autobuild.tool('git'), '--git-dir', git_cache_dir, 'remote', 'update', remote_name)
60
+
61
+ with_retry(10) do
62
+ Autobuild::Subprocess.run('autoproj-cache', :import, Autobuild.tool('git'), '--git-dir', git_cache_dir, 'remote', 'update', remote_name)
63
+ end
47
64
  elsif pkg.importer.kind_of?(Autobuild::ArchiveImporter)
48
65
  Autoproj.message " caching #{pkg.name} (archive)"
49
66
  pkg.importer.cachedir = archive_cache_dir
50
- pkg.importer.update_cache(pkg)
67
+ with_retry(10) do
68
+ pkg.importer.update_cache(pkg)
69
+ end
51
70
  end
52
71
  end
53
72
 
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.7.rc1"
2
+ VERSION = "1.9.7.rc2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7.rc1
4
+ version: 1.9.7.rc2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-05-17 00:00:00.000000000 Z
12
+ date: 2014-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild