autoproj 2.0.3 → 2.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +196 -10
- data/autoproj.gemspec +8 -8
- data/bin/alocate +12 -1
- data/bin/alog +8 -0
- data/bin/amake +12 -1
- data/bin/aup +12 -1
- data/bin/autoproj_bootstrap +15 -6
- data/bin/autoproj_install +15 -6
- data/lib/autoproj/cli/base.rb +15 -0
- data/lib/autoproj/cli/bootstrap.rb +3 -0
- data/lib/autoproj/cli/build.rb +6 -0
- data/lib/autoproj/cli/clean.rb +13 -5
- data/lib/autoproj/cli/doc.rb +8 -0
- data/lib/autoproj/cli/envsh.rb +3 -5
- data/lib/autoproj/cli/inspection_tool.rb +0 -16
- data/lib/autoproj/cli/main.rb +71 -52
- data/lib/autoproj/cli/main_test.rb +4 -0
- data/lib/autoproj/cli/osdeps.rb +5 -6
- data/lib/autoproj/cli/show.rb +1 -1
- data/lib/autoproj/cli/status.rb +77 -19
- data/lib/autoproj/cli/update.rb +16 -26
- data/lib/autoproj/configuration.rb +5 -0
- data/lib/autoproj/environment.rb +11 -1
- data/lib/autoproj/local_package_set.rb +2 -0
- data/lib/autoproj/manifest.rb +16 -0
- data/lib/autoproj/ops/cache.rb +3 -0
- data/lib/autoproj/ops/configuration.rb +3 -2
- data/lib/autoproj/ops/install.rb +13 -4
- data/lib/autoproj/ops/main_config_switcher.rb +3 -3
- data/lib/autoproj/ops/snapshot.rb +4 -7
- data/lib/autoproj/package_definition.rb +10 -0
- data/lib/autoproj/package_managers/bundler_manager.rb +1 -0
- data/lib/autoproj/package_managers/pip_manager.rb +1 -0
- data/lib/autoproj/package_set.rb +39 -6
- data/lib/autoproj/test.rb +8 -0
- data/lib/autoproj/version.rb +1 -1
- data/lib/autoproj/workspace.rb +13 -1
- data/samples/autoproj/README.md +60 -0
- data/samples/autoproj/init.rb +17 -18
- data/samples/autoproj/manifest +18 -34
- data/samples/autoproj/overrides.d/.gitattributes +1 -0
- data/samples/manifest.xml +2 -7
- metadata +64 -36
- data/samples/autoproj/README.txt +0 -52
- data/samples/autoproj/overrides.rb +0 -4
- data/samples/autoproj/overrides.yml +0 -18
- data/samples/osdeps.yml +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc8cc412594a39f08dcc1262a09309892711bbd1
|
4
|
+
data.tar.gz: 1a2c7d45beefce2c25c6a8b48ec65785c8c437df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 44c014c39dba092b57e00f878338b25507d2962b8b492cf962bc514269c226ca45eaf087e2fb07979c89cd3c9134bc12c8c469af259805f5d92ed61f82b6b218
|
7
|
+
data.tar.gz: 95fe2cfc145dd25669e5359947b5ffbf939b9df7ac011af73e650492fdf6e8f7b758ad5f372cfc7e5efd0aa86efa25607b8f84e3744f2ef9784377575b0798b3
|
data/README.md
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/autoproj.svg)](http://badge.fury.io/rb/autoproj)
|
3
3
|
[![Documentation](http://b.repl.ca/v1/yard-docs-blue.png)](http://rubydoc.info/gems/autoproj/frames)
|
4
4
|
|
5
|
-
What is Autoproj
|
6
|
-
|
5
|
+
# What is Autoproj
|
6
|
+
|
7
7
|
Autoproj allows to easily install and maintain software that is under source
|
8
8
|
code form (usually from a version control system). It has been designed to support a
|
9
9
|
package-oriented development process, where each package can have its own
|
10
10
|
version control repository (think "distributed version control"). It also
|
11
11
|
provides an easy integration of the local operating system (Debian, Ubuntu,
|
12
|
-
Fedora,
|
12
|
+
Fedora, MacOSX).
|
13
13
|
|
14
14
|
This tool has been developed over the years. It is now maintained in the frame of the Rock
|
15
15
|
robotics project (http://rock-robotics.org), to install robotics-related
|
@@ -19,8 +19,8 @@ One main design direction for autoproj is that packages can be built with
|
|
19
19
|
autoproj without having been designed to be built with autoproj.
|
20
20
|
|
21
21
|
The philosophy behind autoproj is:
|
22
|
-
* supports any type of build system (CMake
|
23
|
-
* supports different VCS:
|
22
|
+
* supports any type of build system (CMake, autotools, ruby packages, ...)
|
23
|
+
* supports different VCS: git, plain archives, cvs, svn, ...
|
24
24
|
* software packages are plain packages, meaning that they can be built and
|
25
25
|
installed /outside/ an autoproj tree, and are not tied *at all* to the
|
26
26
|
autoproj build system.
|
@@ -29,8 +29,7 @@ The philosophy behind autoproj is:
|
|
29
29
|
access to.
|
30
30
|
* handle code generation properly
|
31
31
|
|
32
|
-
Overview of an autoproj installation
|
33
|
-
-------------------------------------
|
32
|
+
## Overview of an autoproj installation
|
34
33
|
|
35
34
|
The idea in an autoproj installation is that people share _definitions_ for a
|
36
35
|
set of packages that can depend on each other. Then, anyone can cherry-pick in
|
@@ -47,8 +46,8 @@ Each package definition includes:
|
|
47
46
|
See this
|
48
47
|
page[http://www.rock-robotics.org/stable/documentation/autoproj/writing_manifest.html] for more information.
|
49
48
|
|
50
|
-
Software packages in Autoproj
|
51
|
-
|
49
|
+
## Software packages in Autoproj
|
50
|
+
|
52
51
|
In the realm of autoproj, a software package should be a self-contained build
|
53
52
|
system, that could be built outside of an autoproj tree. In practice, it means
|
54
53
|
that the package writer should leverage its build system (for instance, cmake)
|
@@ -57,9 +56,196 @@ appropriate build options that should be given (for instance, include
|
|
57
56
|
directories or library names).
|
58
57
|
|
59
58
|
As a guideline, we recommend that inter-package dependencies are managed by
|
60
|
-
using pkg-config.
|
59
|
+
using pkg-config for C/C++ packages.
|
61
60
|
|
62
61
|
To describe the package, and more importantly to setup cross-package
|
63
62
|
dependencies, an optional manifest file can be
|
64
63
|
added[http://www.rock-robotics.org/stable/documentation/autoproj/advanced/manifest-xml.html].
|
65
64
|
|
65
|
+
# Migrating from v1 to v2
|
66
|
+
|
67
|
+
Autoproj 2.0 has been released on the 22nd December 2016 and brought
|
68
|
+
significant changes both to its internals and to its workflow. What follows
|
69
|
+
describes the changes brought by v2, from the point of view of someone that
|
70
|
+
already knows autoproj v1
|
71
|
+
|
72
|
+
### Upgrade process
|
73
|
+
|
74
|
+
Autoproj 2.x is backward incompatible in two ways: first, it requires
|
75
|
+
ruby 2.0+. Second, both the workspace layout and the way RubyGems are
|
76
|
+
handled changed and therefore the upgrade process is pretty complex.
|
77
|
+
|
78
|
+
For these reasons, the latest version of autoproj 1.x (1.13.3) will
|
79
|
+
not automatically upgrade to 2.x. The update to 2.x will have to be
|
80
|
+
manual. This is going to be a general policy going forward (2.x will
|
81
|
+
not upgrade to 3.x and so on). Moreover, it will remain possible to
|
82
|
+
bootstrap an autoproj 1.x workspace using this bootstrap script:
|
83
|
+
|
84
|
+
https://raw.githubusercontent.com/rock-core/autoproj/v1.13.3/bin/autoproj_bootstrap
|
85
|
+
|
86
|
+
To bootstrap a new install using autoproj 2.0, just follow the
|
87
|
+
standard bootstrap process, which did not change. Note that by using
|
88
|
+
the bootstrap from the 'master' branch on github you *will* bootstrap
|
89
|
+
using autoproj 2.0.
|
90
|
+
|
91
|
+
To upgrade an existing autoproj 1.x install, run the following script
|
92
|
+
from the root of the installation:
|
93
|
+
|
94
|
+
https://raw.githubusercontent.com/rock-core/autoproj/master/bin/autoproj_install
|
95
|
+
|
96
|
+
After the upgrade, one can "downgrade" by simply replacing the new
|
97
|
+
autoproj-generated env.sh script by the backup the upgrade process did
|
98
|
+
(env.sh-autoproj-v1). Open a new console, et voila.
|
99
|
+
|
100
|
+
### New 2.x workspace
|
101
|
+
|
102
|
+
Under 2.x, all autoproj-generated files related to the workspace are
|
103
|
+
saved under a new .autoproj directory (as e.g. the config files and
|
104
|
+
remotes). The upgrade process does not delete these to allow for
|
105
|
+
"downgrading".
|
106
|
+
|
107
|
+
In addition, autoproj now uses [bundler](bundler.io) to manage the gems. This means
|
108
|
+
that, by default, the gems are shared between all autoproj installs,
|
109
|
+
bundler making sure that upgrading a gem on one install does not
|
110
|
+
affect another. This makes bootstrapping a lot faster (since already
|
111
|
+
present gems will be reused) and in the future will allow 'autoproj
|
112
|
+
versions' and related commands (tag and commit) to pin the gem
|
113
|
+
versions. It also resolves the gem dependencies globally, thus
|
114
|
+
detecting and/or handling problems with gems that have conflicting
|
115
|
+
dependencies (an issue we currently have / had with webgen)
|
116
|
+
|
117
|
+
This also means that using the `gem` command to manage the gems is not allowed
|
118
|
+
anymore.
|
119
|
+
|
120
|
+
To add a gem to the workspace, create or edit `autoproj/Gemfile` and add `gem`
|
121
|
+
entries following [the bundler documentation](http://bundler.io/gemfile.html).
|
122
|
+
Once the file is edited, run `autoproj osdeps` and reload the updated `env.sh`.
|
123
|
+
|
124
|
+
To remove gems, remove the corresponding line in `autoproj/Gemfile`, run
|
125
|
+
`autoproj osdeps` and reload env.sh.
|
126
|
+
|
127
|
+
Alternatively to the main `autoproj/Gemfile`, files with the `.gemfile`
|
128
|
+
extension in `autoproj/overrides.d` are also considered
|
129
|
+
|
130
|
+
### Proper help for the command-line interface
|
131
|
+
|
132
|
+
'autoproj help' is useful (which was definitely NOT the case on 1.x),
|
133
|
+
showing details about each subcommand as well as all existing command
|
134
|
+
line options.
|
135
|
+
|
136
|
+
### Parallel import
|
137
|
+
|
138
|
+
autoproj update and status can now operate in parallel. The default is
|
139
|
+
to spawn 10 process, but this can be controlled through the
|
140
|
+
'parallel_import_level' option in .autoproj/config.yml.
|
141
|
+
|
142
|
+
Note that for this feature to work well, one has to specify if a
|
143
|
+
repository needs user interaction (e.g. github private repositories
|
144
|
+
requiring a password) or not. The generic interactive: option can be
|
145
|
+
given for any importer, and the private: option can be used for this
|
146
|
+
purpose in the github handler. The latter also allows to use a
|
147
|
+
different pull method than for public repositories (and defaults to
|
148
|
+
the push handler, e.g. http,ssh leads to private repositories using
|
149
|
+
ssh to pull by default)
|
150
|
+
|
151
|
+
### Improved workflow for overrides
|
152
|
+
|
153
|
+
To increase convenience, the git importer sets up a remote for each
|
154
|
+
package set, with the version control information that this package
|
155
|
+
set expects. So, if you have a rock.core package that is overriden by
|
156
|
+
myproject, the rock.core remote will point to the URL defined in
|
157
|
+
rock.core and the myproject remote will point to the overriden URL.
|
158
|
+
The 'autobuild' remote always points to the final one.
|
159
|
+
|
160
|
+
The status and show subcommands learned the --mainline option. With
|
161
|
+
--mainline, the status is displayed against the VCS without any
|
162
|
+
overrides applied. With --mainline=rock.core, only the overrides up to
|
163
|
+
and including rock.core will be applied:
|
164
|
+
|
165
|
+
autoproj status --mainline # compare the local state against the
|
166
|
+
"upstream" state
|
167
|
+
autoproj status --mainline=my.set # compare the local state against
|
168
|
+
someone that would have overrides only until 'my.set'
|
169
|
+
|
170
|
+
The option is also available to "autoproj show"
|
171
|
+
|
172
|
+
### Environment handling
|
173
|
+
|
174
|
+
The environment is not global anymore, but per-package. This means
|
175
|
+
that builds that were missing dependencies could be previously passing
|
176
|
+
and will fail. It also means that the environment of packages that
|
177
|
+
have been used but are not anymore will not pollute env.sh.
|
178
|
+
|
179
|
+
### Separate build directories
|
180
|
+
|
181
|
+
Autoproj.builddir can be set to a full path, in which case every
|
182
|
+
package's build directory will be placed into a subdirectory of this
|
183
|
+
path (instead of within the package checkout). This is great to avoid
|
184
|
+
backing up build files (separating the build/install and source
|
185
|
+
folders), or to share source files for different build setups.
|
186
|
+
autoproj locate and acd learned -b or --build to resp. locate or cd
|
187
|
+
into a package's build directory. This should also improve the usage
|
188
|
+
of Eclipse in an autoproj environment.
|
189
|
+
|
190
|
+
### Improved workflow with heavy branching
|
191
|
+
|
192
|
+
Principally when using pull requests, we have a tendency to push a lot
|
193
|
+
of code on branches. 'autoproj status' becomes a lot more difficult to
|
194
|
+
interpret as we always have to ask ourselves "is this code on a PR
|
195
|
+
already ?"
|
196
|
+
|
197
|
+
2.0 improves this workflow in two ways:
|
198
|
+
- "autoproj versions" now looks by default remotely to determine the
|
199
|
+
"best" remote branch. It can be turned off with the --local option
|
200
|
+
- autoproj status also checks by default if there is a remote branch,
|
201
|
+
and displays that information. Additionally, the --snapshot option
|
202
|
+
tells status to display the status against this "best" branch.
|
203
|
+
|
204
|
+
### Plugin support
|
205
|
+
|
206
|
+
The autoproj CLI can now be extended with plugins. Two such plugins
|
207
|
+
are already available:
|
208
|
+
autoproj-stats: compute statistics about authorship and
|
209
|
+
copyright/license information
|
210
|
+
autoproj-git: git-aware subcommand (for now, only knows "clean")
|
211
|
+
|
212
|
+
A plugin is a gem, but must be installed using the `autoproj plugin` subcommand
|
213
|
+
to make it available. For instance, `autoproj plugin install autoproj-stats`
|
214
|
+
will add the 'stats' subcommand to the autoproj command, whose documentation
|
215
|
+
is available with autoproj help stats
|
216
|
+
|
217
|
+
### Other changes
|
218
|
+
|
219
|
+
update and build have a working --no-deps option (this was broken pre-2.0)
|
220
|
+
|
221
|
+
All subcommands for which it makes sense now accept a package
|
222
|
+
selection on the command line.
|
223
|
+
|
224
|
+
bootstrap learned --seed-config=PATH to provide a base configuration
|
225
|
+
for the build, useful for automated build environments.
|
226
|
+
|
227
|
+
Autoproj pre-2.0 had widely inconsistent behaviour between source and
|
228
|
+
osdep packages. Hopefully all of them have been fixed. For all intent
|
229
|
+
and purposes, osdeps and source packages look the same. For instance,
|
230
|
+
osdep can be excluded or ignored now.
|
231
|
+
|
232
|
+
autoproj update learned --force-reset to reset to the expected commit,
|
233
|
+
bypassing any check. Great for CI environments.
|
234
|
+
|
235
|
+
# Developing autoproj 2.x
|
236
|
+
|
237
|
+
The best way to use autoproj 2.x from git is to checkout autoproj and
|
238
|
+
autobuild manually, and write a Gemfile.autoproj-2.0 containing
|
239
|
+
|
240
|
+
source "https://rubygems.org"
|
241
|
+
gem "autoproj", path: '/home/doudou/dev/gems/autoproj'
|
242
|
+
gem "autobuild", path: '/home/doudou/dev/gems/autobuild'
|
243
|
+
gem "utilrb", ">= 3.0.0.a"
|
244
|
+
|
245
|
+
Then, pass this gemfile to the --gemfile argument to autoproj_install
|
246
|
+
or autoproj_bootstrap. Note that one can re-run autoproj_install in an
|
247
|
+
already bootstrapped autoproj workspace, e.g.
|
248
|
+
|
249
|
+
wget https://raw.githubusercontent.com/rock-core/autoproj/master/bin/autoproj_install
|
250
|
+
ruby autoproj_install --gemfile=../Gemfile.autoproj-2.0
|
251
|
+
|
data/autoproj.gemspec
CHANGED
@@ -23,15 +23,15 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
24
|
|
25
25
|
s.add_runtime_dependency "bundler"
|
26
|
-
s.add_runtime_dependency "autobuild", ">= 1.
|
27
|
-
s.add_runtime_dependency "utilrb", ">= 3.0"
|
26
|
+
s.add_runtime_dependency "autobuild", ">= 1.11.0.a"
|
27
|
+
s.add_runtime_dependency "utilrb", '~> 3.0.0', ">= 3.0.0"
|
28
28
|
s.add_runtime_dependency "thor", '~> 0.19.0', '>= 0.19.1'
|
29
|
-
s.add_runtime_dependency 'concurrent-ruby'
|
30
|
-
s.add_runtime_dependency 'tty-color', '~> 0.
|
31
|
-
s.add_runtime_dependency 'tty-prompt'
|
32
|
-
s.
|
33
|
-
s.add_development_dependency "
|
34
|
-
s.add_development_dependency "
|
29
|
+
s.add_runtime_dependency 'concurrent-ruby', '~> 1.0.0', '>= 1.0.0'
|
30
|
+
s.add_runtime_dependency 'tty-color', '~> 0.4.0', '>= 0.4.0'
|
31
|
+
s.add_runtime_dependency 'tty-prompt', '~> 0.12.0', '>= 0.12.0'
|
32
|
+
s.add_runtime_dependency 'tty-spinner', '~> 0.4.0', '>= 0.4.0'
|
33
|
+
s.add_development_dependency "flexmock", '~> 2.0', ">= 2.0.0"
|
34
|
+
s.add_development_dependency "minitest", "~> 5.0", ">= 5.0"
|
35
35
|
s.add_development_dependency "simplecov"
|
36
36
|
end
|
37
37
|
|
data/bin/alocate
CHANGED
@@ -2,5 +2,16 @@
|
|
2
2
|
|
3
3
|
require 'autoproj/cli/main'
|
4
4
|
Autoproj::CLI.basic_setup
|
5
|
-
|
5
|
+
|
6
|
+
class Alocate < Autoproj::CLI::Main
|
7
|
+
def self.banner(*)
|
8
|
+
"alocate [options]"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
if ARGV.include?('--help') || ARGV.include?('help')
|
13
|
+
Alocate.start(['help', 'locate'])
|
14
|
+
else
|
15
|
+
Alocate.start(['locate', *ARGV])
|
16
|
+
end
|
6
17
|
|
data/bin/alog
CHANGED
@@ -3,6 +3,14 @@
|
|
3
3
|
require 'autoproj/cli/main'
|
4
4
|
require 'autoproj/cli/locate'
|
5
5
|
|
6
|
+
if ARGV.include?('--help') || ARGV.include?('help')
|
7
|
+
puts "Usage:"
|
8
|
+
puts " alog [package]"
|
9
|
+
puts
|
10
|
+
puts "Shows log available for the given package and allows to select and display one"
|
11
|
+
exit 0
|
12
|
+
end
|
13
|
+
|
6
14
|
Autoproj::CLI.basic_setup
|
7
15
|
Autoproj.report(silent: true) do
|
8
16
|
cli = Autoproj::CLI::Locate.new
|
data/bin/amake
CHANGED
@@ -2,5 +2,16 @@
|
|
2
2
|
|
3
3
|
require 'autoproj/cli/main'
|
4
4
|
Autoproj::CLI.basic_setup
|
5
|
-
|
5
|
+
|
6
|
+
class Amake < Autoproj::CLI::Main
|
7
|
+
def self.banner(*)
|
8
|
+
"amake [options]"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
if ARGV.include?('--help') || ARGV.include?('help')
|
13
|
+
Amake.start(['help', 'build'])
|
14
|
+
else
|
15
|
+
Amake.start(['build', '--amake', *ARGV])
|
16
|
+
end
|
6
17
|
|
data/bin/aup
CHANGED
@@ -2,4 +2,15 @@
|
|
2
2
|
|
3
3
|
require 'autoproj/cli/main'
|
4
4
|
Autoproj::CLI.basic_setup
|
5
|
-
|
5
|
+
|
6
|
+
class Aup < Autoproj::CLI::Main
|
7
|
+
def self.banner(*)
|
8
|
+
"aup [options]"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
if ARGV.include?('--help') || ARGV.include?('help')
|
13
|
+
Aup.start(['help', 'update'])
|
14
|
+
else
|
15
|
+
Aup.start(['update', '--aup', *ARGV])
|
16
|
+
end
|
data/bin/autoproj_bootstrap
CHANGED
@@ -48,6 +48,7 @@ module Autoproj
|
|
48
48
|
@autoproj_options = Array.new
|
49
49
|
|
50
50
|
@env = Hash.new
|
51
|
+
env['RUBYOPT'] = []
|
51
52
|
env['RUBYLIB'] = []
|
52
53
|
env['GEM_PATH'] = []
|
53
54
|
env['GEM_HOME'] = []
|
@@ -190,10 +191,11 @@ module Autoproj
|
|
190
191
|
# @param [String] autoproj_version a constraint on the autoproj version
|
191
192
|
# that should be used
|
192
193
|
# @return [String]
|
193
|
-
def default_gemfile_contents(autoproj_version = ">= 2.0.0
|
194
|
+
def default_gemfile_contents(autoproj_version = ">= 2.0.0")
|
194
195
|
["source \"#{gem_source}\"",
|
196
|
+
"ruby \"#{RUBY_VERSION}\" if respond_to?(:ruby)",
|
195
197
|
"gem \"autoproj\", \"#{autoproj_version}\"",
|
196
|
-
"gem \"utilrb\", \">= 3.0.
|
198
|
+
"gem \"utilrb\", \">= 3.0.1\""].join("\n")
|
197
199
|
end
|
198
200
|
|
199
201
|
# Parse the provided command line options and returns the non-options
|
@@ -260,14 +262,19 @@ module Autoproj
|
|
260
262
|
end
|
261
263
|
end
|
262
264
|
|
263
|
-
def install_bundler(gem_program)
|
265
|
+
def install_bundler(gem_program, silent: false)
|
264
266
|
local = ['--local'] if local?
|
265
267
|
|
268
|
+
redirection = Hash.new
|
269
|
+
if silent
|
270
|
+
redirection = Hash[out: :close]
|
271
|
+
end
|
272
|
+
|
266
273
|
result = system(
|
267
|
-
env_for_child,
|
274
|
+
env_for_child.merge('GEM_HOME' => gems_gem_home),
|
268
275
|
Gem.ruby, gem_program, 'install', '--env-shebang', '--no-document', '--no-format-executable', '--clear-sources', '--source', gem_source,
|
269
276
|
*local,
|
270
|
-
"--bindir=#{File.join(gems_gem_home, 'bin')}", 'bundler')
|
277
|
+
"--bindir=#{File.join(gems_gem_home, 'bin')}", 'bundler', **redirection)
|
271
278
|
|
272
279
|
if !result
|
273
280
|
STDERR.puts "FATAL: failed to install bundler in #{gems_gem_home}"
|
@@ -573,14 +580,16 @@ require 'bundler/setup'
|
|
573
580
|
|
574
581
|
def stage2(*vars)
|
575
582
|
require 'autobuild'
|
576
|
-
puts "saving env.sh and .autoproj/env.sh"
|
583
|
+
puts "saving temporary env.sh and .autoproj/env.sh"
|
577
584
|
save_env_sh(*vars)
|
585
|
+
puts "running 'autoproj envsh' to generate a proper env.sh"
|
578
586
|
if !system(Gem.ruby, autoproj_path, 'envsh', *autoproj_options)
|
579
587
|
STDERR.puts "failed to run autoproj envsh on the newly installed autoproj (#{autoproj_path})"
|
580
588
|
exit 1
|
581
589
|
end
|
582
590
|
# This is really needed on an existing install to install the
|
583
591
|
# gems that were present in the v1 layout
|
592
|
+
puts "running 'autoproj osdeps' to re-install missing gems"
|
584
593
|
if !system(Gem.ruby, autoproj_path, 'osdeps')
|
585
594
|
STDERR.puts "failed to run autoproj osdeps on the newly installed autoproj (#{autoproj_path})"
|
586
595
|
exit 1
|
data/bin/autoproj_install
CHANGED
@@ -48,6 +48,7 @@ module Autoproj
|
|
48
48
|
@autoproj_options = Array.new
|
49
49
|
|
50
50
|
@env = Hash.new
|
51
|
+
env['RUBYOPT'] = []
|
51
52
|
env['RUBYLIB'] = []
|
52
53
|
env['GEM_PATH'] = []
|
53
54
|
env['GEM_HOME'] = []
|
@@ -190,10 +191,11 @@ module Autoproj
|
|
190
191
|
# @param [String] autoproj_version a constraint on the autoproj version
|
191
192
|
# that should be used
|
192
193
|
# @return [String]
|
193
|
-
def default_gemfile_contents(autoproj_version = ">= 2.0.0
|
194
|
+
def default_gemfile_contents(autoproj_version = ">= 2.0.0")
|
194
195
|
["source \"#{gem_source}\"",
|
196
|
+
"ruby \"#{RUBY_VERSION}\" if respond_to?(:ruby)",
|
195
197
|
"gem \"autoproj\", \"#{autoproj_version}\"",
|
196
|
-
"gem \"utilrb\", \">= 3.0.
|
198
|
+
"gem \"utilrb\", \">= 3.0.1\""].join("\n")
|
197
199
|
end
|
198
200
|
|
199
201
|
# Parse the provided command line options and returns the non-options
|
@@ -260,14 +262,19 @@ module Autoproj
|
|
260
262
|
end
|
261
263
|
end
|
262
264
|
|
263
|
-
def install_bundler(gem_program)
|
265
|
+
def install_bundler(gem_program, silent: false)
|
264
266
|
local = ['--local'] if local?
|
265
267
|
|
268
|
+
redirection = Hash.new
|
269
|
+
if silent
|
270
|
+
redirection = Hash[out: :close]
|
271
|
+
end
|
272
|
+
|
266
273
|
result = system(
|
267
|
-
env_for_child,
|
274
|
+
env_for_child.merge('GEM_HOME' => gems_gem_home),
|
268
275
|
Gem.ruby, gem_program, 'install', '--env-shebang', '--no-document', '--no-format-executable', '--clear-sources', '--source', gem_source,
|
269
276
|
*local,
|
270
|
-
"--bindir=#{File.join(gems_gem_home, 'bin')}", 'bundler')
|
277
|
+
"--bindir=#{File.join(gems_gem_home, 'bin')}", 'bundler', **redirection)
|
271
278
|
|
272
279
|
if !result
|
273
280
|
STDERR.puts "FATAL: failed to install bundler in #{gems_gem_home}"
|
@@ -573,14 +580,16 @@ require 'bundler/setup'
|
|
573
580
|
|
574
581
|
def stage2(*vars)
|
575
582
|
require 'autobuild'
|
576
|
-
puts "saving env.sh and .autoproj/env.sh"
|
583
|
+
puts "saving temporary env.sh and .autoproj/env.sh"
|
577
584
|
save_env_sh(*vars)
|
585
|
+
puts "running 'autoproj envsh' to generate a proper env.sh"
|
578
586
|
if !system(Gem.ruby, autoproj_path, 'envsh', *autoproj_options)
|
579
587
|
STDERR.puts "failed to run autoproj envsh on the newly installed autoproj (#{autoproj_path})"
|
580
588
|
exit 1
|
581
589
|
end
|
582
590
|
# This is really needed on an existing install to install the
|
583
591
|
# gems that were present in the v1 layout
|
592
|
+
puts "running 'autoproj osdeps' to re-install missing gems"
|
584
593
|
if !system(Gem.ruby, autoproj_path, 'osdeps')
|
585
594
|
STDERR.puts "failed to run autoproj osdeps on the newly installed autoproj (#{autoproj_path})"
|
586
595
|
exit 1
|