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 +4 -4
- data/lib/autoproj/autobuild.rb +6 -1
- data/lib/autoproj/cli/versions.rb +13 -2
- data/lib/autoproj/default.osdeps +7 -67
- data/lib/autoproj/ops/import.rb +1 -3
- data/lib/autoproj/os_package_installer.rb +8 -8
- data/lib/autoproj/package_managers/manager.rb +0 -5
- data/lib/autoproj/test.rb +3 -2
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +8 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3051262e3145e954b246bb65af46c3f933c559a
|
4
|
+
data.tar.gz: 95d31f3a23bc51706f5dfb810d27ba36723d254e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a82835c379309530d2e8e5009aa3ccc4e6bab65d399b5add8c70522679a31b63772afdf836d0c2af442e73e08747689db4dae2cab555e0ada619d14e162ac81
|
7
|
+
data.tar.gz: 990a003ef1bbbf852cf1f64daae492c6660bf5d769b95acad70fd2ffb4dc171b110204e6908c3316a145427c469b576f8788e4b28883d695e99fe07a8fb172ea
|
data/lib/autoproj/autobuild.rb
CHANGED
@@ -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
|
-
|
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
|
51
|
+
if snapshot_package_sets
|
41
52
|
versions += ops.snapshot_package_sets(nil, only_local: options[:only_local])
|
42
53
|
end
|
43
|
-
if
|
54
|
+
if snapshot_packages
|
44
55
|
versions += ops.snapshot_packages(packages, nil, only_local: options[:only_local])
|
45
56
|
end
|
46
57
|
|
data/lib/autoproj/default.osdeps
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
-
|
118
|
+
- sys-devel/automake
|
162
119
|
- sys-devel/autoconf
|
163
|
-
|
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
|
-
|
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
|
data/lib/autoproj/ops/import.rb
CHANGED
@@ -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
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
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 =
|
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
|
|
data/lib/autoproj/version.rb
CHANGED
data/lib/autoproj/workspace.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|