autoproj 2.0.0.b5 → 2.0.0.b6

Sign up to get free protection for your applications and to get access to all the features.
@@ -119,7 +119,7 @@ module Autoproj
119
119
  end
120
120
 
121
121
  def switch_config(*args)
122
- vcs = ws.config.get('manifest_source', nil)
122
+ vcs = ws.manifest.vcs
123
123
  if args.first =~ /^(\w+)=/
124
124
  # First argument is an option string, we are simply setting the
125
125
  # options without changing the type/url
@@ -132,12 +132,13 @@ module Autoproj
132
132
  url = VCSDefinition.to_absolute_url(url)
133
133
 
134
134
  if vcs && (vcs.type == type && vcs.url == url)
135
+ vcs = vcs.to_hash
135
136
  options.each do |opt|
136
137
  opt_name, opt_value = opt.split('=')
137
- vcs[opt_name] = opt_value
138
+ vcs[opt_name.to_sym] = opt_value
138
139
  end
139
140
  # Validate the VCS definition, but save the hash as-is
140
- VCSDefinition.from_raw(vcs)
141
+ ws.manifest.vcs = VCSDefinition.from_raw(vcs)
141
142
  ws.config.set "manifest_source", vcs.dup, true
142
143
  ws.config.save
143
144
  true
@@ -151,9 +152,9 @@ module Autoproj
151
152
  return if !opt.ask(nil)
152
153
 
153
154
  do_switch_config(true, type, url, *options)
155
+ ws.config.save
154
156
  false
155
157
  end
156
- ws.config.save
157
158
  end
158
159
 
159
160
  # @api private
@@ -80,13 +80,13 @@ module Autoproj
80
80
  #
81
81
  # @return [Boolean]
82
82
  # @see initialize error_or_warn
83
- def keep_going?; !!@keep_going end
83
+ def ignore_errors?; !!@ignore_errors end
84
84
 
85
85
  def initialize(manifest, options = Hash.new)
86
86
  @manifest = manifest
87
87
  options = Kernel.validate_options options,
88
- keep_going: false
89
- @keep_going = options[:keep_going]
88
+ ignore_errors: false
89
+ @ignore_errors = options[:ignore_errors]
90
90
  end
91
91
 
92
92
  def snapshot_package_sets(target_dir = nil)
@@ -103,11 +103,16 @@ module Autoproj
103
103
  result
104
104
  end
105
105
 
106
- def error_or_warn(package, error_msg)
107
- if keep_going?
108
- Autoproj.warn error_msg
106
+ def error_or_warn(package, error)
107
+ if ignore_errors?
108
+ if !error.respond_to?(:to_str)
109
+ error = error.message
110
+ end
111
+ Autoproj.warn error
112
+ elsif error.respond_to?(:to_str)
113
+ raise Autobuild::PackageException.new(package, 'snapshot'), error
109
114
  else
110
- raise Autobuild::PackageException.new(package, 'snapshot'), error_msg
115
+ raise
111
116
  end
112
117
  end
113
118
 
@@ -127,7 +132,12 @@ module Autoproj
127
132
  next
128
133
  end
129
134
 
130
- vcs_info = importer.snapshot(package.autobuild, target_dir)
135
+ vcs_info =
136
+ begin importer.snapshot(package.autobuild, target_dir)
137
+ rescue Exception => e
138
+ error_or_warn(package, "cannot snapshot #{package_name}: #{e.message}")
139
+ end
140
+
131
141
  if vcs_info
132
142
  result << Hash[package_name, vcs_info]
133
143
  else
@@ -73,6 +73,8 @@ module Autoproj
73
73
  if Autobuild.debug then raise
74
74
  else exit 1
75
75
  end
76
+ rescue SystemExit
77
+ raise
76
78
  rescue Exception => e
77
79
  STDERR.puts
78
80
  STDERR.puts Autobuild.color(e.message, :red, :bold)
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "2.0.0.b5"
2
+ VERSION = "2.0.0.b6"
3
3
  end
@@ -300,12 +300,16 @@ module Autoproj
300
300
  silent: false, # NOTE: this is ignored, enclose call with Autoproj.silent { }
301
301
  reconfigure: false,
302
302
  ignore_errors: false,
303
- mainline: nil
303
+ mainline: nil,
304
+ reset: false,
305
+ retry_count: nil
304
306
 
305
307
  Ops::Configuration.new(self).
306
308
  load_package_sets(only_local: options[:only_local],
307
309
  checkout_only: options[:checkout_only],
308
- ignore_errors: options[:ignore_errors])
310
+ ignore_errors: options[:ignore_errors],
311
+ reset: options[:reset],
312
+ retry_count: options[:retry_count])
309
313
 
310
314
  manifest.each_package_set do |pkg_set|
311
315
  if Gem::Version.new(pkg_set.required_autoproj_version) > Gem::Version.new(Autoproj::VERSION)
@@ -539,23 +543,10 @@ module Autoproj
539
543
  env = self.env.dup
540
544
  manifest.all_selected_packages.each do |pkg_name|
541
545
  pkg = manifest.find_autobuild_package(pkg_name)
542
- if File.directory?(pkg.srcdir) && !pkg.applied_post_install?
543
- pkg.apply_post_install
544
- end
545
-
546
546
  pkg.apply_env(env)
547
547
  end
548
548
  env.export_env_sh(shell_helpers: shell_helpers)
549
549
  end
550
-
551
- def apply_post_install
552
- manifest.all_selected_packages.each do |pkg_name|
553
- pkg = manifest.find_autobuild_package(pkg_name)
554
- if File.directory?(pkg.srcdir) && !pkg.applied_post_install?
555
- pkg.apply_post_install
556
- end
557
- end
558
- end
559
550
  end
560
551
 
561
552
  def self.workspace
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: 2.0.0.b5
4
+ version: 2.0.0.b6
5
5
  platform: ruby
6
6
  authors:
7
- - Rock Core Developers
7
+ - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-24 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild
@@ -90,6 +90,20 @@ dependencies:
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
92
  version: 0.19.1
93
+ - !ruby/object:Gem::Dependency
94
+ name: concurrent-ruby
95
+ requirement: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ type: :runtime
101
+ prerelease: false
102
+ version_requirements: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
93
107
  - !ruby/object:Gem::Dependency
94
108
  name: rdoc
95
109
  requirement: !ruby/object:Gem::Requirement
@@ -121,7 +135,7 @@ dependencies:
121
135
  description: autoproj is a manager for sets of software packages. It allows the user
122
136
  to import and build packages from source, still using the underlying distribution's
123
137
  native package manager for software that is available on it.
124
- email: rock-dev@dfki.de
138
+ email: sylvain.joyeux@m4x.org
125
139
  executables:
126
140
  - alocate
127
141
  - amake
@@ -256,7 +270,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
270
  requirements:
257
271
  - - ">="
258
272
  - !ruby/object:Gem::Version
259
- version: 1.9.2
273
+ version: 1.9.3
260
274
  required_rubygems_version: !ruby/object:Gem::Requirement
261
275
  requirements:
262
276
  - - ">"