autoproj 2.0.0.rc35 → 2.0.0.rc36

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: 6c073da877e878b3392109e7b13db5155d57ea65
4
- data.tar.gz: b7956cd83bf9b3f3f12a20f07c017c81ae4e1b19
3
+ metadata.gz: e3051262e3145e954b246bb65af46c3f933c559a
4
+ data.tar.gz: 95d31f3a23bc51706f5dfb810d27ba36723d254e
5
5
  SHA512:
6
- metadata.gz: 431797f00765f0dbef2562d3f1473ad61636cbeee0b3b7cf94e6d066ea768a9019defef5bb04f5dbf643afc3b4852846e5e1c6bb3a5a66553a61dd505edef801
7
- data.tar.gz: a1a0fb447536f9df2c22c3effdc0174eaee7133d06f001443c99077087a5fc33d9dd5a84b9862cd3cfd21fbbd61c51a71decf46e5527aa06c457c4be309cca0d
6
+ metadata.gz: 8a82835c379309530d2e8e5009aa3ccc4e6bab65d399b5add8c70522679a31b63772afdf836d0c2af442e73e08747689db4dae2cab555e0ada619d14e162ac81
7
+ data.tar.gz: 990a003ef1bbbf852cf1f64daae492c6660bf5d769b95acad70fd2ffb4dc171b110204e6908c3316a145427c469b576f8788e4b28883d695e99fe07a8fb172ea
@@ -40,6 +40,11 @@ def explicit_osdeps_selection(name, config = Autoproj.config)
40
40
 
41
41
  module Autobuild
42
42
  class Package
43
+ attr_writer :ws
44
+ def ws
45
+ @ws ||= Autoproj.workspace
46
+ end
47
+
43
48
  # The Autoproj::PackageManifest object that describes this package
44
49
  attr_accessor :description
45
50
  # The set of tags for this package. This is an union of the tags
@@ -136,7 +141,7 @@ def optional_dependency(name)
136
141
 
137
142
  def partition_package(pkg_name)
138
143
  pkg_autobuild, pkg_osdeps = [], []
139
- Autoproj.workspace.manifest.resolve_package_name(pkg_name).each do |type, dep_name|
144
+ ws.manifest.resolve_package_name(pkg_name).each do |type, dep_name|
140
145
  if type == :osdeps
141
146
  pkg_osdeps << dep_name
142
147
  elsif type == :package
@@ -35,12 +35,23 @@ def run(user_selection, options)
35
35
  ignore_non_imported_packages: true)
36
36
 
37
37
  ops = Ops::Snapshot.new(ws.manifest, ignore_errors: options[:keep_going])
38
+
39
+ if user_selection.empty?
40
+ snapshot_package_sets = (options[:config] != false)
41
+ snapshot_packages = !options[:config]
42
+ elsif config_selected
43
+ snapshot_package_sets = true
44
+ snapshot_packages = user_selection.size > 1
45
+ else
46
+ snapshot_package_sets = options[:config]
47
+ snapshot_packages = true
48
+ end
38
49
 
39
50
  versions = Array.new
40
- if (config_selected && options[:config] != false) || user_selection.empty?
51
+ if snapshot_package_sets
41
52
  versions += ops.snapshot_package_sets(nil, only_local: options[:only_local])
42
53
  end
43
- if (!config_selected && !options[:config]) || !user_selection.empty?
54
+ if snapshot_packages
44
55
  versions += ops.snapshot_packages(packages, nil, only_local: options[:only_local])
45
56
  end
46
57
 
@@ -95,84 +95,29 @@ build-essential:
95
95
  opensuse: ["@devel_C_C++", "gcc-c++"]
96
96
  default: clang
97
97
 
98
- autobuild:
99
- - gem: autobuild
100
- - osdep: readline
101
- autoproj:
102
- - gem: autoproj
103
- - osdep: readline
104
-
105
- readline:
106
- debian,ubuntu: libreadline-dev
107
- fedora: readline-devel
108
- opensuse: readline-devel
109
- arch: core/readline
110
- macos-brew: readline
111
- default: ignore
112
-
113
98
  # The following definitions are for the VCS and build systems
114
99
  git:
115
- debian:
116
- lenny: git
117
- default: git-core
118
- ubuntu: git-core
119
100
  gentoo: dev-vcs/git
120
- arch: git
121
- fedora: git
122
- macos-port: git
123
- macos-brew: git
124
- opensuse: git
125
- freebsd: git
101
+ default: git
126
102
 
127
103
  hg:
128
- debian,ubuntu: mercurial
129
104
  gentoo: dev-vcs/mercurial
130
- arch: mercurial
131
- fedora: mercurial
132
- darwin: mercurial
133
- opensuse: mercurial
134
- freebsd: mercurial
105
+ default: mercurial
135
106
 
136
107
  svn:
137
- debian,ubuntu: subversion
138
108
  gentoo: dev-vcs/subversion
139
- arch: subversion
140
- fedora: subversion
141
- darwin: subversion
142
- opensuse: subversion
143
- freebsd: subversion
109
+ default: subversion
144
110
 
145
111
  cmake:
146
- debian,ubuntu:
147
- - cmake
148
112
  gentoo: dev-util/cmake
149
- arch: cmake
150
- fedora: cmake
151
- darwin: cmake
152
- opensuse: cmake
153
- freebsd: cmake
113
+ default: cmake
154
114
  osdep: build-essential
155
115
 
156
116
  autotools:
157
- debian,ubuntu:
158
- - automake
159
- - autoconf
160
117
  gentoo:
161
- - "sys-devel/automake"
118
+ - sys-devel/automake
162
119
  - sys-devel/autoconf
163
- arch:
164
- - automake
165
- - autoconf
166
- fedora:
167
- - automake
168
- - autoconf
169
- darwin:
170
- - automake
171
- - autoconf
172
- opensuse:
173
- - automake
174
- - autoconf
175
- freebsd:
120
+ default:
176
121
  - automake
177
122
  - autoconf
178
123
  osdep: build-essential
@@ -201,12 +146,7 @@ archive:
201
146
  default: ignore
202
147
 
203
148
  cvs:
204
- debian,ubuntu: cvs
205
- fedora: cvs
206
- darwin: cvs
207
- arch: cvs
208
- opensuse: cvs
209
- freebsd: cvs
149
+ default: cvs
210
150
 
211
151
  pip:
212
152
  debian,ubuntu: python-pip
@@ -107,8 +107,6 @@ class ImportFailed < RuntimeError; end
107
107
  # Import all packages from the given selection, and their
108
108
  # dependencies
109
109
  def import_selected_packages(selection, updated_packages, options = Hash.new)
110
- all_processed_packages = Set.new
111
-
112
110
  parallel_options, options = Kernel.filter_options options,
113
111
  parallel: ws.config.parallel_import_level
114
112
 
@@ -281,8 +279,8 @@ def finalize_package_load(processed_packages)
281
279
  if File.directory?(pkg.srcdir)
282
280
  pkg.prepare
283
281
  Rake::Task["#{pkg.name}-prepare"].instance_variable_set(:@already_invoked, true)
284
- pkg.update_environment
285
282
  end
283
+ pkg.update_environment
286
284
  package_queue.concat(pkg.dependencies)
287
285
  end
288
286
  all
@@ -342,14 +342,14 @@ def install(osdep_packages, install_only: false, run_package_managers_without_pa
342
342
  [os_packages, other_packages].each do |packages|
343
343
  packages.each do |handler, list|
344
344
  list = list.to_set - installed_resolved_packages[handler]
345
- next if !run_package_managers_without_packages ||
346
- (list.empty? && !handler.call_while_empty?)
347
-
348
- handler.install(
349
- list.to_a,
350
- filter_uptodate_packages: filter_uptodate_packages?,
351
- install_only: install_only)
352
- installed_resolved_packages[handler].merge(list)
345
+
346
+ if !list.empty? || (run_package_managers_without_packages && handler.call_while_empty?)
347
+ handler.install(
348
+ list.to_a,
349
+ filter_uptodate_packages: filter_uptodate_packages?,
350
+ install_only: install_only)
351
+ installed_resolved_packages[handler].merge(list)
352
+ end
353
353
  end
354
354
  end
355
355
  installed_packages.merge(packages)
@@ -31,11 +31,6 @@ def initialize(ws)
31
31
  @call_while_empty = false
32
32
  end
33
33
 
34
- # The primary name for this package manager
35
- def name
36
- names.first
37
- end
38
-
39
34
  # Overload to perform initialization of environment variables in
40
35
  # order to have a properly functioning package manager
41
36
  #
data/lib/autoproj/test.rb CHANGED
@@ -68,10 +68,11 @@ def teardown
68
68
  end
69
69
 
70
70
  def create_bootstrap
71
- dir = Dir.mktmpdir
72
- @tmpdir << dir
71
+ dir = make_tmpdir
73
72
  require 'autoproj/ops/main_config_switcher'
74
73
  FileUtils.cp_r Ops::MainConfigSwitcher::MAIN_CONFIGURATION_TEMPLATE, File.join(dir, 'autoproj')
74
+ FileUtils.mkdir_p File.join(dir, '.autoproj')
75
+ FileUtils.touch File.join(dir, '.autoproj', 'config.yml')
75
76
  Workspace.new(dir)
76
77
  end
77
78
 
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "2.0.0.rc35"
2
+ VERSION = "2.0.0.rc36"
3
3
  end
@@ -25,6 +25,7 @@ def initialize(root_dir)
25
25
  @env = Environment.new
26
26
  env.source_before(File.join(dot_autoproj_dir, 'env.sh'))
27
27
  @manifest = Manifest.new
28
+ @config = Configuration.new
28
29
 
29
30
  @os_package_installer = OSPackageInstaller.new(self, os_package_resolver)
30
31
  env.prepare(root_dir)
@@ -60,7 +61,7 @@ def self.from_pwd
60
61
  def self.from_dir(dir)
61
62
  if path = Autoproj.find_workspace_dir(dir)
62
63
  Workspace.new(path)
63
- elsif find_v1_workspace_dir(dir)
64
+ elsif Autoproj.find_v1_workspace_dir(dir)
64
65
  raise OutdatedWorkspace, "#{dir} looks like a v1 workspace, run autoproj upgrade before continuing"
65
66
  else
66
67
  raise NotWorkspace, "not in a Autoproj installation"
@@ -703,6 +704,12 @@ def install_os_packages_for(packages, options = Hash.new)
703
704
  install_os_packages(required_os_packages, options)
704
705
  end
705
706
 
707
+ # Register a package on this workspace
708
+ def register_package(package, block = nil, package_set = manifest.main_package_set, file = nil)
709
+ pkg = manifest.register_package(package, block, package_set, file)
710
+ pkg.autobuild.ws = self
711
+ pkg
712
+ end
706
713
  end
707
714
 
708
715
  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.rc35
4
+ version: 2.0.0.rc36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-25 00:00:00.000000000 Z
11
+ date: 2016-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler