autoproj 1.6.1.b1 → 1.6.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -2,8 +2,9 @@
2
2
  * fix a limitation of giving directories on the command line. Before, only
3
3
  packages that were explicitely listed in the layout would be selected. Now,
4
4
  all packages are looked for -- even
5
- * fix Fedora and other flavors of Linux being (wrongly) detected as being
6
- supported.
5
+ * fix Fedora and other flavors of Linux being (wrongly) detected as supported
6
+ OSes
7
+ * fix answering 'wait' at bootstrap time. This was rejected later on.
7
8
 
8
9
  = Version 1.6.0
9
10
  * starting this version, autoproj becomes the official build system for the
@@ -191,6 +191,15 @@ module Autoproj
191
191
  end
192
192
  end
193
193
 
194
+ # Returns true if it is possible to install packages for the operating
195
+ # system on which we are installed
196
+ def self.supported_operating_system?
197
+ osdef = operating_system
198
+ return false if !osdef
199
+
200
+ OS_PACKAGE_INSTALL.has_key?(osdef[0])
201
+ end
202
+
194
203
  # Autodetects the operating system name and version
195
204
  #
196
205
  # +osname+ is the operating system name, all in lowercase (e.g. ubuntu,
@@ -266,10 +275,10 @@ module Autoproj
266
275
  EOSCRIPT
267
276
 
268
277
  OS_PACKAGE_INSTALL = {
269
- 'debian' => 'export DEBIAN_FRONTEND=noninteractive; apt-get install -y %s',
270
- 'ubuntu' => 'export DEBIAN_FRONTEND=noninteractive; apt-get install -y %s',
271
- 'gentoo' => 'emerge --noreplace %s',
272
- 'arch' => 'pacman -Sy --noconfirm %s'
278
+ 'debian' => "export DEBIAN_FRONTEND=noninteractive; apt-get install -y '%s'",
279
+ 'ubuntu' => "export DEBIAN_FRONTEND=noninteractive; apt-get install -y '%s'",
280
+ 'gentoo' => "emerge --noreplace '%s'",
281
+ 'arch' => "pacman -Sy --noconfirm '%s'"
273
282
  }
274
283
 
275
284
  NO_PACKAGE = 0
@@ -396,7 +405,7 @@ module Autoproj
396
405
 
397
406
  "#! /bin/bash\n" +
398
407
  GAIN_ROOT_ACCESS + "\n" +
399
- (OS_PACKAGE_INSTALL[os_name] % [os_packages.join(" ")]) +
408
+ (OS_PACKAGE_INSTALL[os_name] % [os_packages.join("' '")]) +
400
409
  "\n" + shell_snippets.join("\n")
401
410
  end
402
411
 
@@ -533,14 +542,14 @@ module Autoproj
533
542
 
534
543
  # Requests the installation of the given set of packages
535
544
  def install(packages, package_osdeps = Hash.new)
536
- os_def = OSDependencies.operating_system
545
+ handled_os = OSDependencies.supported_operating_system?
537
546
  osdeps, gems = partition_packages(packages, package_osdeps)
538
547
  gems = filter_uptodate_gems(gems)
539
548
  if osdeps.empty? && gems.empty?
540
549
  return
541
550
  end
542
551
 
543
- if automatic_osdeps_mode == AUTOMATIC && !os_def && !osdeps.empty?
552
+ if automatic_osdeps_mode == AUTOMATIC && !handled_os && !osdeps.empty?
544
553
  puts
545
554
  puts Autoproj.color("==============================", :bold)
546
555
  puts Autoproj.color("The packages that will be built require some other software to be installed", :bold)
@@ -566,7 +575,7 @@ module Autoproj
566
575
  end
567
576
 
568
577
  if automatic_osdeps_mode == ASK
569
- if !os_def
578
+ if !handled_os
570
579
  if gems.empty?
571
580
  # Nothing we can do, but the users required "ASK".
572
581
  # So, at least, let him press enter
@@ -618,7 +627,7 @@ module Autoproj
618
627
 
619
628
  did_something = false
620
629
 
621
- if os_def && !osdeps.empty?
630
+ if handled_os && !osdeps.empty?
622
631
  shell_script = generate_os_script(osdeps)
623
632
  if Autoproj.verbose
624
633
  Autoproj.progress "Installing non-ruby OS dependencies with"
@@ -756,12 +765,11 @@ EODEFS
756
765
  if ENV['AUTOPROJ_AUTOMATIC_OSDEPS']
757
766
  automatic_osdeps = ENV['AUTOPROJ_AUTOMATIC_OSDEPS']
758
767
  else
759
- operating_system = Autoproj::OSDependencies.operating_system
760
- if !operating_system
768
+ if !Autoproj::OSDependencies.supported_operating_system?
761
769
  puts <<-EOT
762
770
 
763
771
  autoproj is usually able to handle the installation of operating system packages
764
- himself. However, it does not know about your operating system, and will
772
+ himself. However, it does not handle your operating system (yet), and will
765
773
  therefore have to let you install the packages yourself.
766
774
 
767
775
  It can still install the RubyGems packages that are required by the built
@@ -807,12 +815,14 @@ else
807
815
  automatic_osdeps = true
808
816
  elsif answer == "no"
809
817
  automatic_osdeps = false
818
+ elsif answer == 'wait'
819
+ automatic_osdeps = :wait
810
820
  elsif answer == 'ask'
811
821
  automatic_osdeps = :ask
812
822
  elsif answer == 'yes'
813
823
  automatic_osdeps = true
814
824
  else
815
- print "invalid answer. Please answer with 'yes', 'no' or 'ask' "
825
+ print "invalid answer. Please answer with 'yes', 'no', 'wait' or 'ask' "
816
826
  STDOUT.flush
817
827
  end
818
828
  end
@@ -853,20 +863,6 @@ rescue Autoproj::ConfigError => e
853
863
  exit(1)
854
864
  end
855
865
 
856
- # If the user specifies "dev" on the command line, install the prerelease
857
- # version of autoproj
858
- if ARGV.first == "dev"
859
- Autoproj::OSDependencies.gem_with_prerelease = true
860
- ARGV.shift
861
- end
862
- begin
863
- osdeps_management.install('autoproj')
864
- rescue Autoproj::ConfigError => e
865
- STDERR.puts "failed: #{e.message}"
866
- exit(1)
867
- end
868
- Autoproj::OSDependencies.gem_with_prerelease = false
869
-
870
866
  File.open('env.sh', 'w') do |io|
871
867
  io.write <<-EOSHELL
872
868
  export RUBYOPT=-rubygems
@@ -875,9 +871,26 @@ export PATH=$GEM_HOME/bin:$PATH
875
871
  EOSHELL
876
872
  end
877
873
 
878
- ENV['AUTOPROJ_AUTOMATIC_OSDEPS'] = automatic_osdeps.to_s
879
- if !system('autoproj', 'bootstrap', *ARGV)
880
- STDERR.puts "ERROR: failed to run autoproj bootstrap #{ARGV.join(", ")}"
881
- exit 1
874
+ # If the user specifies "dev" on the command line, install the prerelease
875
+ # version of autoproj. If it is "localdev", expect him to install autoproj and
876
+ # run autoproj bootstrap manually.
877
+ if ARGV.first != "localdev"
878
+ if ARGV.first == "dev"
879
+ Autoproj::OSDependencies.gem_with_prerelease = true
880
+ ARGV.shift
881
+ end
882
+ begin
883
+ osdeps_management.install(['autoproj'])
884
+ rescue Autoproj::ConfigError => e
885
+ STDERR.puts "failed: #{e.message}"
886
+ exit(1)
887
+ end
888
+ Autoproj::OSDependencies.gem_with_prerelease = false
889
+
890
+ ENV['AUTOPROJ_AUTOMATIC_OSDEPS'] = automatic_osdeps.to_s
891
+ if !system('autoproj', 'bootstrap', *ARGV)
892
+ STDERR.puts "ERROR: failed to run autoproj bootstrap #{ARGV.join(", ")}"
893
+ exit 1
894
+ end
882
895
  end
883
896
 
@@ -588,10 +588,14 @@ where 'mode' is one of:
588
588
  end
589
589
  opts.on("--os", "displays the operating system as detected by autoproj") do
590
590
  os = OSDependencies.operating_system
591
- puts "name: #{os[0]}"
592
- puts "version:"
593
- os[1].each do |version_name|
594
- puts " #{version_name}"
591
+ if !os
592
+ puts "no information about that OS"
593
+ else
594
+ puts "name: #{os[0]}"
595
+ puts "version:"
596
+ os[1].each do |version_name|
597
+ puts " #{version_name}"
598
+ end
595
599
  end
596
600
  exit 0
597
601
  end
@@ -189,10 +189,10 @@ module Autoproj
189
189
  EOSCRIPT
190
190
 
191
191
  OS_PACKAGE_INSTALL = {
192
- 'debian' => 'export DEBIAN_FRONTEND=noninteractive; apt-get install -y %s',
193
- 'ubuntu' => 'export DEBIAN_FRONTEND=noninteractive; apt-get install -y %s',
194
- 'gentoo' => 'emerge --noreplace %s',
195
- 'arch' => 'pacman -Sy --noconfirm %s'
192
+ 'debian' => "export DEBIAN_FRONTEND=noninteractive; apt-get install -y '%s'",
193
+ 'ubuntu' => "export DEBIAN_FRONTEND=noninteractive; apt-get install -y '%s'",
194
+ 'gentoo' => "emerge --noreplace '%s'",
195
+ 'arch' => "pacman -Sy --noconfirm '%s'"
196
196
  }
197
197
 
198
198
  NO_PACKAGE = 0
@@ -319,7 +319,7 @@ module Autoproj
319
319
 
320
320
  "#! /bin/bash\n" +
321
321
  GAIN_ROOT_ACCESS + "\n" +
322
- (OS_PACKAGE_INSTALL[os_name] % [os_packages.join(" ")]) +
322
+ (OS_PACKAGE_INSTALL[os_name] % [os_packages.join("' '")]) +
323
323
  "\n" + shell_snippets.join("\n")
324
324
  end
325
325
 
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.6.1.b1"
2
+ VERSION = "1.6.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- hash: 6629755
5
- prerelease: true
4
+ hash: 13
5
+ prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
9
  - 1
10
- - b1
11
- version: 1.6.1.b1
10
+ version: 1.6.1
12
11
  platform: ruby
13
12
  authors:
14
13
  - Sylvain Joyeux
@@ -274,14 +273,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
274
273
  required_rubygems_version: !ruby/object:Gem::Requirement
275
274
  none: false
276
275
  requirements:
277
- - - ">"
276
+ - - ">="
278
277
  - !ruby/object:Gem::Version
279
- hash: 25
278
+ hash: 3
280
279
  segments:
281
- - 1
282
- - 3
283
- - 1
284
- version: 1.3.1
280
+ - 0
281
+ version: "0"
285
282
  requirements: []
286
283
 
287
284
  rubyforge_project: autobuild