autoproj 1.13.0.b2 → 1.13.0.b3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/bin/autoproj-bootstrap +3 -0
- data/bin/autoproj_bootstrap +74 -61
- data/bin/autoproj_bootstrap.in +55 -46
- data/lib/autoproj/gitorious.rb +36 -20
- data/lib/autoproj/osdeps.rb +14 -10
- data/lib/autoproj/version.rb +1 -1
- metadata +3 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 267a53a915d1942b6ed2c047f9e01b0de00b5b86
|
4
|
+
data.tar.gz: d3ebff740a4501a34c37bdb0ee76ae3eecfeb9e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18c79c0311a77c735bb21a70349c83f9a5bc77cd3b9dd38535dcc1530368cc30262448cce83d052db1827a63b16ade2f7d7ec3ed907c3b59ed889c5bd5393cb
|
7
|
+
data.tar.gz: 86d8c54ae3c7ff1158c5d8cdf93fa30fd40799417b556b09df76e9c56d6e71f32193f8b7483864ad3177cc94127058db637b71ffe1073230a026413690afe9f7
|
data/Rakefile
CHANGED
data/bin/autoproj-bootstrap
CHANGED
@@ -7,7 +7,10 @@ if File.exists?(File.join(root_dir, 'autoproj', "manifest"))
|
|
7
7
|
raise ConfigError.new, "this installation is already bootstrapped. Remove the autoproj directory if it is not the case"
|
8
8
|
end
|
9
9
|
|
10
|
+
Autoproj.root_dir = root_dir
|
11
|
+
Autoproj.manifest = Autoproj::Manifest.new
|
10
12
|
Ops::Tools.load_autoprojrc
|
13
|
+
Autoproj.prepare_environment
|
11
14
|
|
12
15
|
# Check if the .autoprojrc changed the PATH and therefore which autoproj script
|
13
16
|
# should be executed ... and restart if it did
|
data/bin/autoproj_bootstrap
CHANGED
@@ -5,17 +5,6 @@ if RUBY_VERSION < "1.9.2"
|
|
5
5
|
exit 1
|
6
6
|
end
|
7
7
|
|
8
|
-
if defined? Encoding # This is a 1.9-only thing
|
9
|
-
Encoding.default_internal = Encoding::UTF_8
|
10
|
-
Encoding.default_external = Encoding::UTF_8
|
11
|
-
end
|
12
|
-
|
13
|
-
if ENV['AUTOPROJ_CURRENT_ROOT'] && ENV['AUTOPROJ_CURRENT_ROOT'] != Dir.pwd
|
14
|
-
STDERR.puts "the env.sh from #{ENV['AUTOPROJ_CURRENT_ROOT']} seem to already be sourced"
|
15
|
-
STDERR.puts "start a new shell and try to bootstrap again"
|
16
|
-
exit 1
|
17
|
-
end
|
18
|
-
|
19
8
|
require 'rbconfig'
|
20
9
|
module Autobuild
|
21
10
|
@windows = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw|[Ww]indows)!
|
@@ -29,38 +18,6 @@ module Autobuild
|
|
29
18
|
end
|
30
19
|
end
|
31
20
|
|
32
|
-
require 'set'
|
33
|
-
curdir_entries = Dir.entries('.').to_set - [".", "..", "autoproj_bootstrap", ".gems", 'env.sh'].to_set
|
34
|
-
if !curdir_entries.empty? && ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] != '1'
|
35
|
-
while true
|
36
|
-
print "The current directory is not empty, continue bootstrapping anyway ? [yes] "
|
37
|
-
STDOUT.flush
|
38
|
-
answer = STDIN.readline.chomp
|
39
|
-
if answer == "no"
|
40
|
-
exit
|
41
|
-
elsif answer == "" || answer == "yes"
|
42
|
-
# Set the environment variable since we might restart the
|
43
|
-
# autoproj_bootstrap script and -- anyway -- will run "autoproj
|
44
|
-
# bootstrap" later on
|
45
|
-
break
|
46
|
-
else
|
47
|
-
STDOUT.puts "invalid answer. Please answer 'yes' or 'no'"
|
48
|
-
STDOUT.flush
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
# Environment is clean, so just mark it as so unconditionally
|
54
|
-
ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] = '1'
|
55
|
-
|
56
|
-
gem_home = ENV['AUTOPROJ_GEM_HOME'] || File.join(Dir.pwd, '.gems')
|
57
|
-
gem_path = ([gem_home] + Gem.default_path).join(":")
|
58
|
-
Gem.paths = Hash['GEM_HOME' => gem_home, 'GEM_PATH' => gem_path]
|
59
|
-
|
60
|
-
ENV['GEM_HOME'] = gem_home
|
61
|
-
ENV['GEM_PATH'] = gem_path
|
62
|
-
ENV['PATH'] = "#{ENV['GEM_HOME']}/bin:#{ENV['PATH']}"
|
63
|
-
|
64
21
|
require 'yaml'
|
65
22
|
require 'set'
|
66
23
|
|
@@ -1113,16 +1070,7 @@ fi
|
|
1113
1070
|
# Now, reset the directories in our own RubyGems instance
|
1114
1071
|
Gem.paths = ENV
|
1115
1072
|
|
1116
|
-
|
1117
|
-
# it (there are no programmatic ways to override this)
|
1118
|
-
if cache = cache_dir
|
1119
|
-
gem_cache_dir = File.join(gem_home, 'cache')
|
1120
|
-
if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
|
1121
|
-
FileUtils.mkdir_p gem_home
|
1122
|
-
FileUtils.rm_rf gem_cache_dir
|
1123
|
-
Autoproj.create_symlink(cache, gem_cache_dir)
|
1124
|
-
end
|
1125
|
-
end
|
1073
|
+
use_cache_dir
|
1126
1074
|
end
|
1127
1075
|
|
1128
1076
|
# A global cache directory that should be used to avoid
|
@@ -1135,6 +1083,19 @@ fi
|
|
1135
1083
|
end
|
1136
1084
|
end
|
1137
1085
|
|
1086
|
+
def self.use_cache_dir
|
1087
|
+
# If there is a cache directory, make sure .gems/cache points to
|
1088
|
+
# it (there are no programmatic ways to override this)
|
1089
|
+
if cache = cache_dir
|
1090
|
+
gem_cache_dir = File.join(gem_home, 'cache')
|
1091
|
+
if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
|
1092
|
+
FileUtils.mkdir_p gem_home
|
1093
|
+
FileUtils.rm_rf gem_cache_dir
|
1094
|
+
Autoproj.create_symlink(cache, gem_cache_dir)
|
1095
|
+
end
|
1096
|
+
end
|
1097
|
+
end
|
1098
|
+
|
1138
1099
|
# Return the directory in which RubyGems package should be installed
|
1139
1100
|
def self.gem_home
|
1140
1101
|
ENV['AUTOPROJ_GEM_HOME'] || File.join(Autoproj.root_dir, ".gems")
|
@@ -2871,14 +2832,6 @@ end
|
|
2871
2832
|
|
2872
2833
|
|
2873
2834
|
|
2874
|
-
# Override Autoproj.root_dir
|
2875
|
-
module Autoproj
|
2876
|
-
def self.root_dir
|
2877
|
-
@root_dir
|
2878
|
-
end
|
2879
|
-
@root_dir = Dir.pwd
|
2880
|
-
end
|
2881
|
-
|
2882
2835
|
DEFS = <<EODEFS
|
2883
2836
|
---
|
2884
2837
|
none: ignore
|
@@ -3070,6 +3023,65 @@ sudo:
|
|
3070
3023
|
|
3071
3024
|
EODEFS
|
3072
3025
|
|
3026
|
+
# Override Autoproj.root_dir
|
3027
|
+
module Autoproj
|
3028
|
+
def self.root_dir
|
3029
|
+
@root_dir
|
3030
|
+
end
|
3031
|
+
@root_dir = Dir.pwd
|
3032
|
+
end
|
3033
|
+
|
3034
|
+
if File.directory?(File.join(Autoproj.root_dir, 'autoproj'))
|
3035
|
+
STDERR.puts "there is already an autoproj/ directory here, cannot bootstrap"
|
3036
|
+
STDERR.puts "Either delete it and attempt bootstrapping again, or source env.sh"
|
3037
|
+
STDERR.puts "and use the usual autoproj workflow"
|
3038
|
+
exit 1
|
3039
|
+
end
|
3040
|
+
|
3041
|
+
if defined? Encoding # This is a 1.9-only thing
|
3042
|
+
Encoding.default_internal = Encoding::UTF_8
|
3043
|
+
Encoding.default_external = Encoding::UTF_8
|
3044
|
+
end
|
3045
|
+
|
3046
|
+
if ENV['AUTOPROJ_CURRENT_ROOT'] && ENV['AUTOPROJ_CURRENT_ROOT'] != Dir.pwd
|
3047
|
+
STDERR.puts "the env.sh from #{ENV['AUTOPROJ_CURRENT_ROOT']} seem to already be sourced"
|
3048
|
+
STDERR.puts "start a new shell and try to bootstrap again"
|
3049
|
+
exit 1
|
3050
|
+
end
|
3051
|
+
|
3052
|
+
require 'set'
|
3053
|
+
curdir_entries = Dir.entries('.').to_set - [".", "..", "autoproj_bootstrap", ".gems", 'env.sh'].to_set
|
3054
|
+
if !curdir_entries.empty? && ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] != '1'
|
3055
|
+
while true
|
3056
|
+
print "The current directory is not empty, continue bootstrapping anyway ? [yes] "
|
3057
|
+
STDOUT.flush
|
3058
|
+
answer = STDIN.readline.chomp
|
3059
|
+
if answer == "no"
|
3060
|
+
exit
|
3061
|
+
elsif answer == "" || answer == "yes"
|
3062
|
+
# Set the environment variable since we might restart the
|
3063
|
+
# autoproj_bootstrap script and -- anyway -- will run "autoproj
|
3064
|
+
# bootstrap" later on
|
3065
|
+
break
|
3066
|
+
else
|
3067
|
+
STDOUT.puts "invalid answer. Please answer 'yes' or 'no'"
|
3068
|
+
STDOUT.flush
|
3069
|
+
end
|
3070
|
+
end
|
3071
|
+
end
|
3072
|
+
|
3073
|
+
# Environment is clean, so just mark it as so unconditionally
|
3074
|
+
ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] = '1'
|
3075
|
+
|
3076
|
+
gem_home = ENV['AUTOPROJ_GEM_HOME'] || File.join(Dir.pwd, '.gems')
|
3077
|
+
gem_path = ([gem_home] + Gem.default_path).join(":")
|
3078
|
+
Gem.paths = Hash['GEM_HOME' => gem_home, 'GEM_PATH' => gem_path]
|
3079
|
+
|
3080
|
+
ENV['GEM_HOME'] = gem_home
|
3081
|
+
ENV['GEM_PATH'] = gem_path
|
3082
|
+
ENV['PATH'] = "#{ENV['GEM_HOME']}/bin:#{ENV['PATH']}"
|
3083
|
+
|
3084
|
+
|
3073
3085
|
Autoproj::OSDependencies.define_osdeps_mode_option
|
3074
3086
|
osdeps_mode = Autoproj::OSDependencies.osdeps_mode.join(",")
|
3075
3087
|
ENV['AUTOPROJ_OSDEPS_MODE'] = osdeps_mode
|
@@ -3088,6 +3100,7 @@ osdeps_management =
|
|
3088
3100
|
Autoproj::OSDependencies.new(YAML.load(DEFS))
|
3089
3101
|
end
|
3090
3102
|
osdeps_management.silent = false
|
3103
|
+
Autoproj::PackageManagers::GemManager.use_cache_dir
|
3091
3104
|
|
3092
3105
|
begin
|
3093
3106
|
STDERR.puts "autoproj: installing a proper Ruby environment (this can take a long time)"
|
data/bin/autoproj_bootstrap.in
CHANGED
@@ -5,17 +5,6 @@ if RUBY_VERSION < "1.9.2"
|
|
5
5
|
exit 1
|
6
6
|
end
|
7
7
|
|
8
|
-
if defined? Encoding # This is a 1.9-only thing
|
9
|
-
Encoding.default_internal = Encoding::UTF_8
|
10
|
-
Encoding.default_external = Encoding::UTF_8
|
11
|
-
end
|
12
|
-
|
13
|
-
if ENV['AUTOPROJ_CURRENT_ROOT'] && ENV['AUTOPROJ_CURRENT_ROOT'] != Dir.pwd
|
14
|
-
STDERR.puts "the env.sh from #{ENV['AUTOPROJ_CURRENT_ROOT']} seem to already be sourced"
|
15
|
-
STDERR.puts "start a new shell and try to bootstrap again"
|
16
|
-
exit 1
|
17
|
-
end
|
18
|
-
|
19
8
|
require 'rbconfig'
|
20
9
|
module Autobuild
|
21
10
|
@windows = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw|[Ww]indows)!
|
@@ -29,38 +18,6 @@ module Autobuild
|
|
29
18
|
end
|
30
19
|
end
|
31
20
|
|
32
|
-
require 'set'
|
33
|
-
curdir_entries = Dir.entries('.').to_set - [".", "..", "autoproj_bootstrap", ".gems", 'env.sh'].to_set
|
34
|
-
if !curdir_entries.empty? && ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] != '1'
|
35
|
-
while true
|
36
|
-
print "The current directory is not empty, continue bootstrapping anyway ? [yes] "
|
37
|
-
STDOUT.flush
|
38
|
-
answer = STDIN.readline.chomp
|
39
|
-
if answer == "no"
|
40
|
-
exit
|
41
|
-
elsif answer == "" || answer == "yes"
|
42
|
-
# Set the environment variable since we might restart the
|
43
|
-
# autoproj_bootstrap script and -- anyway -- will run "autoproj
|
44
|
-
# bootstrap" later on
|
45
|
-
break
|
46
|
-
else
|
47
|
-
STDOUT.puts "invalid answer. Please answer 'yes' or 'no'"
|
48
|
-
STDOUT.flush
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
# Environment is clean, so just mark it as so unconditionally
|
54
|
-
ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] = '1'
|
55
|
-
|
56
|
-
gem_home = ENV['AUTOPROJ_GEM_HOME'] || File.join(Dir.pwd, '.gems')
|
57
|
-
gem_path = ([gem_home] + Gem.default_path).join(":")
|
58
|
-
Gem.paths = Hash['GEM_HOME' => gem_home, 'GEM_PATH' => gem_path]
|
59
|
-
|
60
|
-
ENV['GEM_HOME'] = gem_home
|
61
|
-
ENV['GEM_PATH'] = gem_path
|
62
|
-
ENV['PATH'] = "#{ENV['GEM_HOME']}/bin:#{ENV['PATH']}"
|
63
|
-
|
64
21
|
require 'yaml'
|
65
22
|
require 'set'
|
66
23
|
|
@@ -140,6 +97,10 @@ TOOLS_CODE
|
|
140
97
|
OPTIONS_CODE
|
141
98
|
SYSTEM_CODE
|
142
99
|
|
100
|
+
DEFS = <<EODEFS
|
101
|
+
OSDEPS_DEFAULTS
|
102
|
+
EODEFS
|
103
|
+
|
143
104
|
# Override Autoproj.root_dir
|
144
105
|
module Autoproj
|
145
106
|
def self.root_dir
|
@@ -148,9 +109,56 @@ module Autoproj
|
|
148
109
|
@root_dir = Dir.pwd
|
149
110
|
end
|
150
111
|
|
151
|
-
|
152
|
-
|
153
|
-
|
112
|
+
if File.directory?(File.join(Autoproj.root_dir, 'autoproj'))
|
113
|
+
STDERR.puts "there is already an autoproj/ directory here, cannot bootstrap"
|
114
|
+
STDERR.puts "Either delete it and attempt bootstrapping again, or source env.sh"
|
115
|
+
STDERR.puts "and use the usual autoproj workflow"
|
116
|
+
exit 1
|
117
|
+
end
|
118
|
+
|
119
|
+
if defined? Encoding # This is a 1.9-only thing
|
120
|
+
Encoding.default_internal = Encoding::UTF_8
|
121
|
+
Encoding.default_external = Encoding::UTF_8
|
122
|
+
end
|
123
|
+
|
124
|
+
if ENV['AUTOPROJ_CURRENT_ROOT'] && ENV['AUTOPROJ_CURRENT_ROOT'] != Dir.pwd
|
125
|
+
STDERR.puts "the env.sh from #{ENV['AUTOPROJ_CURRENT_ROOT']} seem to already be sourced"
|
126
|
+
STDERR.puts "start a new shell and try to bootstrap again"
|
127
|
+
exit 1
|
128
|
+
end
|
129
|
+
|
130
|
+
require 'set'
|
131
|
+
curdir_entries = Dir.entries('.').to_set - [".", "..", "autoproj_bootstrap", ".gems", 'env.sh'].to_set
|
132
|
+
if !curdir_entries.empty? && ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] != '1'
|
133
|
+
while true
|
134
|
+
print "The current directory is not empty, continue bootstrapping anyway ? [yes] "
|
135
|
+
STDOUT.flush
|
136
|
+
answer = STDIN.readline.chomp
|
137
|
+
if answer == "no"
|
138
|
+
exit
|
139
|
+
elsif answer == "" || answer == "yes"
|
140
|
+
# Set the environment variable since we might restart the
|
141
|
+
# autoproj_bootstrap script and -- anyway -- will run "autoproj
|
142
|
+
# bootstrap" later on
|
143
|
+
break
|
144
|
+
else
|
145
|
+
STDOUT.puts "invalid answer. Please answer 'yes' or 'no'"
|
146
|
+
STDOUT.flush
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
# Environment is clean, so just mark it as so unconditionally
|
152
|
+
ENV['AUTOPROJ_BOOTSTRAP_IGNORE_NONEMPTY_DIR'] = '1'
|
153
|
+
|
154
|
+
gem_home = ENV['AUTOPROJ_GEM_HOME'] || File.join(Dir.pwd, '.gems')
|
155
|
+
gem_path = ([gem_home] + Gem.default_path).join(":")
|
156
|
+
Gem.paths = Hash['GEM_HOME' => gem_home, 'GEM_PATH' => gem_path]
|
157
|
+
|
158
|
+
ENV['GEM_HOME'] = gem_home
|
159
|
+
ENV['GEM_PATH'] = gem_path
|
160
|
+
ENV['PATH'] = "#{ENV['GEM_HOME']}/bin:#{ENV['PATH']}"
|
161
|
+
|
154
162
|
|
155
163
|
Autoproj::OSDependencies.define_osdeps_mode_option
|
156
164
|
osdeps_mode = Autoproj::OSDependencies.osdeps_mode.join(",")
|
@@ -170,6 +178,7 @@ osdeps_management =
|
|
170
178
|
Autoproj::OSDependencies.new(YAML.load(DEFS))
|
171
179
|
end
|
172
180
|
osdeps_management.silent = false
|
181
|
+
Autoproj::PackageManagers::GemManager.use_cache_dir
|
173
182
|
|
174
183
|
begin
|
175
184
|
STDERR.puts "autoproj: installing a proper Ruby environment (this can take a long time)"
|
data/lib/autoproj/gitorious.rb
CHANGED
@@ -25,35 +25,51 @@ module Autoproj
|
|
25
25
|
:http_url => "https://git.#{base_url}",
|
26
26
|
:ssh_url => "git@#{base_url}:",
|
27
27
|
:fallback_to_http => true,
|
28
|
-
:default => '
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"If you give two values, comma-separated, the first one will be",
|
33
|
-
"used for pulling and the second one for pushing"]
|
28
|
+
:default => 'http,ssh',
|
29
|
+
:disabled_methods => []
|
30
|
+
|
31
|
+
disabled_methods = Array(options[:disabled_methods])
|
34
32
|
|
35
33
|
access_methods = Hash[
|
36
34
|
'git' => 'git,ssh',
|
37
35
|
'ssh' => 'ssh,ssh',
|
38
36
|
'http' => 'http,http']
|
39
37
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
38
|
+
gitorious_long_doc = [
|
39
|
+
"How should I interact with #{base_url} (#{(access_methods.keys - disabled_methods).sort.join(", ")})",
|
40
|
+
"If you give two values, comma-separated, the first one will be",
|
41
|
+
"used for pulling and the second one for pushing"]
|
42
|
+
|
43
|
+
validator = lambda do |value|
|
44
|
+
if value =~ /,/
|
45
|
+
value.split(',').each do |method|
|
46
|
+
if !access_methods.has_key?(method)
|
47
|
+
raise Autoproj::InputError, "#{method} is not a known access method"
|
48
|
+
elsif disabled_methods.include?(method)
|
49
|
+
raise Autoproj::InputError, "#{method} is disabled on #{base_url}"
|
48
50
|
end
|
49
|
-
elsif !access_methods.has_key?(value)
|
50
|
-
raise Autoproj::InputError, "#{value} is not a known access method"
|
51
51
|
end
|
52
|
-
|
53
|
-
value
|
52
|
+
elsif !access_methods.has_key?(value)
|
53
|
+
raise Autoproj::InputError, "#{value} is not a known access method"
|
54
|
+
elsif disabled_methods.include?(value)
|
55
|
+
raise Autoproj::InputError, "#{method} is disabled on #{base_url}"
|
54
56
|
end
|
55
57
|
|
56
|
-
|
58
|
+
value
|
59
|
+
end
|
60
|
+
|
61
|
+
configuration_option name, 'string',
|
62
|
+
:default => options[:default],
|
63
|
+
:doc => gitorious_long_doc, &validator
|
64
|
+
|
65
|
+
access_mode = Autoproj.config.get(name)
|
66
|
+
begin
|
67
|
+
validator[access_mode]
|
68
|
+
rescue Autoproj::InputError => e
|
69
|
+
Autoproj.warn e.message
|
70
|
+
Autoproj.config.reset(name)
|
71
|
+
access_mode = Autoproj.config.get(name)
|
72
|
+
end
|
57
73
|
access_mode = access_methods[access_mode] || access_mode
|
58
74
|
pull, push = access_mode.split(',')
|
59
75
|
[[pull, "_ROOT"], [push, "_PUSH_ROOT"]].each do |method, var_suffix|
|
@@ -82,6 +98,6 @@ module Autoproj
|
|
82
98
|
end
|
83
99
|
end
|
84
100
|
|
85
|
-
Autoproj.gitorious_server_configuration('GITORIOUS', 'gitorious.org')
|
101
|
+
Autoproj.gitorious_server_configuration('GITORIOUS', 'gitorious.org', :default => 'http,ssh', :disabled_methods => 'git')
|
86
102
|
Autoproj.gitorious_server_configuration('GITHUB', 'github.com', :http_url => 'https://github.com', :default => 'http,ssh')
|
87
103
|
|
data/lib/autoproj/osdeps.rb
CHANGED
@@ -555,16 +555,7 @@ fi
|
|
555
555
|
# Now, reset the directories in our own RubyGems instance
|
556
556
|
Gem.paths = ENV
|
557
557
|
|
558
|
-
|
559
|
-
# it (there are no programmatic ways to override this)
|
560
|
-
if cache = cache_dir
|
561
|
-
gem_cache_dir = File.join(gem_home, 'cache')
|
562
|
-
if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
|
563
|
-
FileUtils.mkdir_p gem_home
|
564
|
-
FileUtils.rm_rf gem_cache_dir
|
565
|
-
Autoproj.create_symlink(cache, gem_cache_dir)
|
566
|
-
end
|
567
|
-
end
|
558
|
+
use_cache_dir
|
568
559
|
end
|
569
560
|
|
570
561
|
# A global cache directory that should be used to avoid
|
@@ -577,6 +568,19 @@ fi
|
|
577
568
|
end
|
578
569
|
end
|
579
570
|
|
571
|
+
def self.use_cache_dir
|
572
|
+
# If there is a cache directory, make sure .gems/cache points to
|
573
|
+
# it (there are no programmatic ways to override this)
|
574
|
+
if cache = cache_dir
|
575
|
+
gem_cache_dir = File.join(gem_home, 'cache')
|
576
|
+
if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
|
577
|
+
FileUtils.mkdir_p gem_home
|
578
|
+
FileUtils.rm_rf gem_cache_dir
|
579
|
+
Autoproj.create_symlink(cache, gem_cache_dir)
|
580
|
+
end
|
581
|
+
end
|
582
|
+
end
|
583
|
+
|
580
584
|
# Return the directory in which RubyGems package should be installed
|
581
585
|
def self.gem_home
|
582
586
|
ENV['AUTOPROJ_GEM_HOME'] || File.join(Autoproj.root_dir, ".gems")
|
data/lib/autoproj/version.rb
CHANGED
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: 1.13.0.
|
4
|
+
version: 1.13.0.b3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rock Core Developers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autobuild
|
@@ -250,11 +250,4 @@ rubygems_version: 2.2.2
|
|
250
250
|
signing_key:
|
251
251
|
specification_version: 4
|
252
252
|
summary: Easy installation and management of sets of software packages
|
253
|
-
test_files:
|
254
|
-
- test/package_managers/test_apt_dpkg_manager.rb
|
255
|
-
- test/package_managers/test_gem.rb
|
256
|
-
- test/package_managers/test_pip.rb
|
257
|
-
- test/test_manifest.rb
|
258
|
-
- test/test_os_dependencies.rb
|
259
|
-
- test/test_package_manifest.rb
|
260
|
-
- test/ops/test_configuration.rb
|
253
|
+
test_files: []
|