autoproj 1.6.0.rc3 → 1.6.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/guide/src/autoproj_bootstrap +4 -0
- data/lib/autoproj/cmdline.rb +47 -17
- data/lib/autoproj/osdeps.rb +12 -3
- data/lib/autoproj/version.rb +1 -1
- metadata +27 -4
@@ -567,8 +567,12 @@ module Autoproj
|
|
567
567
|
|
568
568
|
if automatic_osdeps_mode == ASK && (os_def || !gems.empty?)
|
569
569
|
if !os_def
|
570
|
+
print "Should I install the RubyGems packages ? [yes] "
|
571
|
+
else
|
570
572
|
print "Should I install these packages ? [yes] "
|
573
|
+
end
|
571
574
|
STDOUT.flush
|
575
|
+
|
572
576
|
do_osdeps = nil
|
573
577
|
while do_osdeps.nil?
|
574
578
|
answer = STDIN.readline.chomp
|
data/lib/autoproj/cmdline.rb
CHANGED
@@ -48,7 +48,7 @@ module Autoproj
|
|
48
48
|
else
|
49
49
|
# Ask the user for the automatic_osdeps option
|
50
50
|
doc_string =<<-EOT
|
51
|
-
#{color("Should autoproj handle the OS package installation automatically (yes, no, wait or ask) ?", :bold)}
|
51
|
+
#{Autoproj.color("Should autoproj handle the OS package installation automatically (yes, no, wait or ask) ?", :bold)}
|
52
52
|
If you say "no", the list of OS dependencies that need to be installed will be listed,
|
53
53
|
and autoproj will go on, assuming that you have installed them yourself. If you say
|
54
54
|
"ask", you will be prompted each time a package needs to be installed. Finally, if you
|
@@ -197,8 +197,9 @@ module Autoproj
|
|
197
197
|
# source.yml files)
|
198
198
|
manifest.load_importers
|
199
199
|
|
200
|
-
#
|
201
|
-
#
|
200
|
+
# We finished loading the configuration files. Not all configuration
|
201
|
+
# is done (since we need to process the package setup blocks), but
|
202
|
+
# save the current state of the configuration anyway.
|
202
203
|
Autoproj.save_config
|
203
204
|
|
204
205
|
# Loads OS package definitions once and for all
|
@@ -268,6 +269,10 @@ module Autoproj
|
|
268
269
|
pkg.user_block[pkg.autobuild]
|
269
270
|
end
|
270
271
|
end
|
272
|
+
|
273
|
+
# We now have processed the process setup blocks. All configuration
|
274
|
+
# should be done and we can save the configuration data.
|
275
|
+
Autoproj.save_config
|
271
276
|
end
|
272
277
|
|
273
278
|
|
@@ -558,7 +563,7 @@ where 'mode' is one of:
|
|
558
563
|
status: displays the state of the packages w.r.t. their source VCS
|
559
564
|
list-sets: list all available package sets
|
560
565
|
update: only import/update packages, do not build them
|
561
|
-
update-
|
566
|
+
update-config: only update the configuration
|
562
567
|
|
563
568
|
-- Autoproj Configuration
|
564
569
|
bootstrap: starts a new autoproj installation. Usage:
|
@@ -722,7 +727,13 @@ where 'mode' is one of:
|
|
722
727
|
Autobuild.do_build = false
|
723
728
|
Autobuild.do_update = false
|
724
729
|
@update_os_dependencies = false
|
725
|
-
when "update-
|
730
|
+
when "update-config"
|
731
|
+
@only_config = true
|
732
|
+
Autobuild.do_update = true
|
733
|
+
@update_os_dependencies = false
|
734
|
+
Autobuild.do_build = false
|
735
|
+
when "update-sets" # provided for backward compatibility
|
736
|
+
Autoproj.warn("update-sets is deprecated. Use update-config instead")
|
726
737
|
@only_config = true
|
727
738
|
Autobuild.do_update = true
|
728
739
|
@update_os_dependencies = false
|
@@ -756,13 +767,13 @@ where 'mode' is one of:
|
|
756
767
|
end
|
757
768
|
|
758
769
|
if !pkg.importer.respond_to?(:status)
|
759
|
-
lines << color(" the #{pkg.importer.class.name.gsub(/.*::/, '')} importer does not support status display", :bold, :red)
|
770
|
+
lines << Autoproj.color(" the #{pkg.importer.class.name.gsub(/.*::/, '')} importer does not support status display", :bold, :red)
|
760
771
|
elsif !File.directory?(pkg.srcdir)
|
761
|
-
lines << color(" is not imported yet", :magenta)
|
772
|
+
lines << Autoproj.color(" is not imported yet", :magenta)
|
762
773
|
else
|
763
774
|
status = pkg.importer.status(pkg)
|
764
775
|
if status.uncommitted_code
|
765
|
-
lines << color(" contains uncommitted modifications", :red)
|
776
|
+
lines << Autoproj.color(" contains uncommitted modifications", :red)
|
766
777
|
end
|
767
778
|
|
768
779
|
case status.status
|
@@ -776,27 +787,27 @@ where 'mode' is one of:
|
|
776
787
|
last_was_in_sync = true
|
777
788
|
next
|
778
789
|
else
|
779
|
-
lines << color(" local and remote are in sync", :green)
|
790
|
+
lines << Autoproj.color(" local and remote are in sync", :green)
|
780
791
|
end
|
781
792
|
when Autobuild::Importer::Status::ADVANCED
|
782
|
-
lines << color(" local contains #{status.local_commits.size} commit that remote does not have:", :magenta)
|
793
|
+
lines << Autoproj.color(" local contains #{status.local_commits.size} commit that remote does not have:", :magenta)
|
783
794
|
status.local_commits.each do |line|
|
784
|
-
lines << color(" #{line}", :magenta)
|
795
|
+
lines << Autoproj.color(" #{line}", :magenta)
|
785
796
|
end
|
786
797
|
when Autobuild::Importer::Status::SIMPLE_UPDATE
|
787
|
-
lines << color(" remote contains #{status.remote_commits.size} commit that local does not have:", :magenta)
|
798
|
+
lines << Autoproj.color(" remote contains #{status.remote_commits.size} commit that local does not have:", :magenta)
|
788
799
|
status.remote_commits.each do |line|
|
789
|
-
lines << color(" #{line}", :magenta)
|
800
|
+
lines << Autoproj.color(" #{line}", :magenta)
|
790
801
|
end
|
791
802
|
when Autobuild::Importer::Status::NEEDS_MERGE
|
792
|
-
lines << color(" local and remote have diverged with respectively #{status.local_commits.size} and #{status.remote_commits.size} commits each", :magenta)
|
803
|
+
lines << Autoproj.color(" local and remote have diverged with respectively #{status.local_commits.size} and #{status.remote_commits.size} commits each", :magenta)
|
793
804
|
lines << " -- local commits --"
|
794
805
|
status.local_commits.each do |line|
|
795
|
-
lines << color(" #{line}", :magenta)
|
806
|
+
lines << Autoproj.color(" #{line}", :magenta)
|
796
807
|
end
|
797
808
|
lines << " -- remote commits --"
|
798
809
|
status.remote_commits.each do |line|
|
799
|
-
lines << color(" #{line}", :magenta)
|
810
|
+
lines << Autoproj.color(" #{line}", :magenta)
|
800
811
|
end
|
801
812
|
end
|
802
813
|
end
|
@@ -904,13 +915,22 @@ where 'mode' is one of:
|
|
904
915
|
vcs = Autoproj.normalize_vcs_definition(vcs_def)
|
905
916
|
|
906
917
|
# Install the OS dependencies required for this VCS
|
918
|
+
handle_automatic_osdeps
|
907
919
|
osdeps = Autoproj::OSDependencies.load_default
|
908
920
|
osdeps.install([vcs.type])
|
909
921
|
|
910
922
|
# Now check out the actual configuration
|
911
923
|
config_dir = File.join(Dir.pwd, "autoproj")
|
912
924
|
if delete_current
|
913
|
-
|
925
|
+
# Find a backup name for it
|
926
|
+
backup_base_name = backup_name = "#{config_dir}.bak"
|
927
|
+
index = 0
|
928
|
+
while File.directory?(backup_name)
|
929
|
+
backup_name = "#{backup_base_name}-#{index}.bak"
|
930
|
+
index += 1
|
931
|
+
end
|
932
|
+
|
933
|
+
FileUtils.mv config_dir, backup_name
|
914
934
|
end
|
915
935
|
Autoproj::Manifest.update_source(vcs, "autoproj main configuration", 'autoproj_config', config_dir)
|
916
936
|
|
@@ -923,6 +943,16 @@ manifest_source:
|
|
923
943
|
#{vcs_def.map { |k, v| "#{k}: #{v}" }.join("\n ")}
|
924
944
|
EOTEXT
|
925
945
|
end
|
946
|
+
rescue Exception
|
947
|
+
if backup_name
|
948
|
+
FileUtils.rm_rf config_dir if config_dir
|
949
|
+
FileUtils.mv backup_name, config_dir
|
950
|
+
end
|
951
|
+
raise
|
952
|
+
ensure
|
953
|
+
if backup_name
|
954
|
+
FileUtils.rm_rf backup_name
|
955
|
+
end
|
926
956
|
end
|
927
957
|
|
928
958
|
def self.bootstrap(*args)
|
data/lib/autoproj/osdeps.rb
CHANGED
@@ -479,9 +479,18 @@ module Autoproj
|
|
479
479
|
puts
|
480
480
|
end
|
481
481
|
|
482
|
-
if automatic_osdeps_mode == ASK
|
482
|
+
if automatic_osdeps_mode == ASK
|
483
483
|
if !os_def
|
484
|
-
|
484
|
+
if gems.empty?
|
485
|
+
# Nothing we can do, but the users required "ASK".
|
486
|
+
# So, at least, let him press enter
|
487
|
+
print "There are external packages, but I can't install them on this OS. Press ENTER to continue"
|
488
|
+
STDOUT.flush
|
489
|
+
STDIN.readline
|
490
|
+
do_osdeps = false
|
491
|
+
else
|
492
|
+
print "Should I install the RubyGems packages ? [yes] "
|
493
|
+
end
|
485
494
|
else
|
486
495
|
print "Should I install these packages ? [yes] "
|
487
496
|
end
|
@@ -555,7 +564,7 @@ module Autoproj
|
|
555
564
|
end
|
556
565
|
|
557
566
|
cmdline = [Autobuild.tool('gem'), 'install']
|
558
|
-
if
|
567
|
+
if Autoproj::OSDependencies.gem_with_prerelease
|
559
568
|
cmdline << "--prerelease"
|
560
569
|
end
|
561
570
|
cmdline.concat(gems)
|
data/lib/autoproj/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 977940589
|
4
5
|
prerelease: true
|
5
6
|
segments:
|
6
7
|
- 1
|
7
8
|
- 6
|
8
9
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.6.0.
|
10
|
+
- rc4
|
11
|
+
version: 1.6.0.rc4
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Sylvain Joyeux
|
@@ -15,16 +16,18 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-
|
19
|
+
date: 2010-08-04 00:00:00 +02:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
22
23
|
name: autobuild
|
23
24
|
prerelease: false
|
24
25
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
25
27
|
requirements:
|
26
28
|
- - ">="
|
27
29
|
- !ruby/object:Gem::Version
|
30
|
+
hash: 17
|
28
31
|
segments:
|
29
32
|
- 1
|
30
33
|
- 5
|
@@ -36,9 +39,11 @@ dependencies:
|
|
36
39
|
name: rmail
|
37
40
|
prerelease: false
|
38
41
|
requirement: &id002 !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
39
43
|
requirements:
|
40
44
|
- - ">="
|
41
45
|
- !ruby/object:Gem::Version
|
46
|
+
hash: 23
|
42
47
|
segments:
|
43
48
|
- 1
|
44
49
|
- 0
|
@@ -50,9 +55,11 @@ dependencies:
|
|
50
55
|
name: utilrb
|
51
56
|
prerelease: false
|
52
57
|
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
53
59
|
requirements:
|
54
60
|
- - ">="
|
55
61
|
- !ruby/object:Gem::Version
|
62
|
+
hash: 29
|
56
63
|
segments:
|
57
64
|
- 1
|
58
65
|
- 3
|
@@ -64,9 +71,11 @@ dependencies:
|
|
64
71
|
name: nokogiri
|
65
72
|
prerelease: false
|
66
73
|
requirement: &id004 !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
67
75
|
requirements:
|
68
76
|
- - ">="
|
69
77
|
- !ruby/object:Gem::Version
|
78
|
+
hash: 29
|
70
79
|
segments:
|
71
80
|
- 1
|
72
81
|
- 3
|
@@ -78,9 +87,11 @@ dependencies:
|
|
78
87
|
name: highline
|
79
88
|
prerelease: false
|
80
89
|
requirement: &id005 !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
81
91
|
requirements:
|
82
92
|
- - ">="
|
83
93
|
- !ruby/object:Gem::Version
|
94
|
+
hash: 3
|
84
95
|
segments:
|
85
96
|
- 1
|
86
97
|
- 5
|
@@ -92,9 +103,11 @@ dependencies:
|
|
92
103
|
name: rubyforge
|
93
104
|
prerelease: false
|
94
105
|
requirement: &id006 !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
95
107
|
requirements:
|
96
108
|
- - ">="
|
97
109
|
- !ruby/object:Gem::Version
|
110
|
+
hash: 7
|
98
111
|
segments:
|
99
112
|
- 2
|
100
113
|
- 0
|
@@ -106,9 +119,11 @@ dependencies:
|
|
106
119
|
name: webgen
|
107
120
|
prerelease: false
|
108
121
|
requirement: &id007 !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
109
123
|
requirements:
|
110
124
|
- - ">="
|
111
125
|
- !ruby/object:Gem::Version
|
126
|
+
hash: 25
|
112
127
|
segments:
|
113
128
|
- 0
|
114
129
|
- 5
|
@@ -120,9 +135,11 @@ dependencies:
|
|
120
135
|
name: rdoc
|
121
136
|
prerelease: false
|
122
137
|
requirement: &id008 !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
123
139
|
requirements:
|
124
140
|
- - ">="
|
125
141
|
- !ruby/object:Gem::Version
|
142
|
+
hash: 31
|
126
143
|
segments:
|
127
144
|
- 2
|
128
145
|
- 4
|
@@ -134,9 +151,11 @@ dependencies:
|
|
134
151
|
name: hoe
|
135
152
|
prerelease: false
|
136
153
|
requirement: &id009 !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
137
155
|
requirements:
|
138
156
|
- - ">="
|
139
157
|
- !ruby/object:Gem::Version
|
158
|
+
hash: 21
|
140
159
|
segments:
|
141
160
|
- 2
|
142
161
|
- 6
|
@@ -244,16 +263,20 @@ rdoc_options:
|
|
244
263
|
require_paths:
|
245
264
|
- lib
|
246
265
|
required_ruby_version: !ruby/object:Gem::Requirement
|
266
|
+
none: false
|
247
267
|
requirements:
|
248
268
|
- - ">="
|
249
269
|
- !ruby/object:Gem::Version
|
270
|
+
hash: 3
|
250
271
|
segments:
|
251
272
|
- 0
|
252
273
|
version: "0"
|
253
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
275
|
+
none: false
|
254
276
|
requirements:
|
255
277
|
- - ">"
|
256
278
|
- !ruby/object:Gem::Version
|
279
|
+
hash: 25
|
257
280
|
segments:
|
258
281
|
- 1
|
259
282
|
- 3
|
@@ -262,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
285
|
requirements: []
|
263
286
|
|
264
287
|
rubyforge_project: autobuild
|
265
|
-
rubygems_version: 1.3.
|
288
|
+
rubygems_version: 1.3.7
|
266
289
|
signing_key:
|
267
290
|
specification_version: 3
|
268
291
|
summary: Easy installation and management of robotics software
|