autoproj 1.6.0 → 1.6.1.b1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ = Version 1.6.1
2
+ * fix a limitation of giving directories on the command line. Before, only
3
+ packages that were explicitely listed in the layout would be selected. Now,
4
+ all packages are looked for -- even
5
+ * fix Fedora and other flavors of Linux being (wrongly) detected as being
6
+ supported.
7
+
1
8
  = Version 1.6.0
2
9
  * starting this version, autoproj becomes the official build system for the
3
10
  Orocos Toolchain project
@@ -972,13 +972,16 @@ manifest_source:
972
972
  #
973
973
  # We don't use Autoproj.gem_home there as we might not be in an
974
974
  # autoproj directory at all
975
+ gem_home = ENV['AUTOPROJ_GEM_HOME'] || File.join(Dir.pwd, ".gems")
975
976
  if ENV['GEM_HOME'] && Autoproj.in_autoproj_installation?(ENV['GEM_HOME']) &&
976
- ENV['GEM_HOME'] != ENV['AUTOPROJ_GEM_HOME']
977
- Autoproj.progress "autoproj: reusing bootstrap from #{File.dirname(ENV['GEM_HOME'])}"
978
- FileUtils.cp_r ENV['GEM_HOME'], ".gems"
979
- ENV['GEM_HOME'] = File.join(Dir.pwd, ".gems")
977
+ ENV['GEM_HOME'] != gem_home
978
+ if !File.exists?(gem_home)
979
+ Autoproj.progress "autoproj: reusing bootstrap from #{File.dirname(ENV['GEM_HOME'])}"
980
+ FileUtils.cp_r ENV['GEM_HOME'], gem_home
981
+ end
982
+ ENV['GEM_HOME'] = gem_home
980
983
 
981
- Autoproj.save_config
984
+ Autoproj.progress "restarting bootstrapping from #{Dir.pwd}"
982
985
 
983
986
  require 'rbconfig'
984
987
  ruby = RbConfig::CONFIG['RUBY_INSTALL_NAME']
@@ -1093,13 +1093,17 @@ module Autoproj
1093
1093
  end
1094
1094
  end
1095
1095
 
1096
- # Returns the set of package names that are available for installation.
1097
- # It is the set of packages listed in the layout minus the exluded and
1098
- # ignred ones
1099
- def all_package_names
1096
+ # Returns the set of package names that are explicitely listed in the
1097
+ # layout, minus the excluded and ignored ones
1098
+ def all_layout_packages
1100
1099
  default_packages
1101
1100
  end
1102
1101
 
1102
+ # Returns all defined package names, minus the excluded and ignored ones
1103
+ def all_package_names
1104
+ Autobuild::Package.each.map { |name, _| name }.to_set
1105
+ end
1106
+
1103
1107
  # Returns the set of packages that should be built if the user does not
1104
1108
  # specify any on the command line
1105
1109
  def default_packages
@@ -1196,14 +1200,14 @@ module Autoproj
1196
1200
  # The expanded selection
1197
1201
  expanded_packages = Set.new
1198
1202
  # All the packages that are available on this installation
1199
- all_package_names = self.all_package_names
1203
+ all_layout_packages = self.all_layout_packages
1200
1204
 
1201
1205
  # First, remove packages that are directly referenced by name or by
1202
1206
  # package set names
1203
1207
  selected_packages.delete_if do |sel|
1204
1208
  sel = Regexp.new(Regexp.quote(sel))
1205
1209
 
1206
- packages = all_package_names.
1210
+ packages = all_layout_packages.
1207
1211
  find_all { |pkg_name| pkg_name =~ sel }.
1208
1212
  to_set
1209
1213
  expanded_packages |= packages
@@ -1211,7 +1215,7 @@ module Autoproj
1211
1215
  sources = each_source.find_all { |source| source.name =~ sel }
1212
1216
  sources.each do |source|
1213
1217
  packages = resolve_package_set(source.name).to_set
1214
- expanded_packages |= (packages & all_package_names)
1218
+ expanded_packages |= (packages & all_layout_packages)
1215
1219
  end
1216
1220
 
1217
1221
  !packages.empty? && !sources.empty?
@@ -1221,23 +1225,31 @@ module Autoproj
1221
1225
  return expanded_packages
1222
1226
  end
1223
1227
 
1224
- # Now, expand sublayout and directory names
1228
+ # Now, search for layout names
1225
1229
  each_package_set(nil) do |layout_name, packages, _|
1226
1230
  selected_packages.delete_if do |sel|
1227
1231
  if layout_name[0..-1] =~ Regexp.new("#{sel}\/?$")
1228
1232
  expanded_packages |= packages.to_set
1229
- else
1230
- match = Regexp.new("^#{Regexp.quote(sel)}")
1231
- all_package_names.each do |pkg_name|
1232
- pkg = Autobuild::Package[pkg_name]
1233
- if pkg.srcdir =~ match
1234
- expanded_packages << pkg_name
1235
- end
1236
- end
1237
1233
  end
1238
1234
  end
1239
1235
  end
1240
1236
 
1237
+ # Finally, check for package source directories
1238
+ all_packages = self.all_package_names
1239
+ selected_packages.delete_if do |sel|
1240
+ match = Regexp.new("^#{Regexp.quote(sel)}")
1241
+ all_packages.each do |pkg_name|
1242
+ pkg = Autobuild::Package[pkg_name]
1243
+ if pkg.srcdir =~ match
1244
+ expanded_packages << pkg_name
1245
+ end
1246
+ end
1247
+ end
1248
+
1249
+ # Some packages might be there even though they are not listed in
1250
+ # the layout (either un-defined or depended-upon by other packages).
1251
+ # Check for those by looking for root_dir/package_name
1252
+
1241
1253
  # Finally, remove packages that are explicitely excluded and/or
1242
1254
  # ignored
1243
1255
  expanded_packages.delete_if { |pkg_name| excluded?(pkg_name) || ignored?(pkg_name) }
@@ -105,6 +105,15 @@ module Autoproj
105
105
  end
106
106
  end
107
107
 
108
+ # Returns true if it is possible to install packages for the operating
109
+ # system on which we are installed
110
+ def self.supported_operating_system?
111
+ osdef = operating_system
112
+ return false if !osdef
113
+
114
+ OS_PACKAGE_INSTALL.has_key?(osdef[0])
115
+ end
116
+
108
117
  # Autodetects the operating system name and version
109
118
  #
110
119
  # +osname+ is the operating system name, all in lowercase (e.g. ubuntu,
@@ -447,14 +456,14 @@ module Autoproj
447
456
 
448
457
  # Requests the installation of the given set of packages
449
458
  def install(packages, package_osdeps = Hash.new)
450
- os_def = OSDependencies.operating_system
459
+ handled_os = OSDependencies.supported_operating_system?
451
460
  osdeps, gems = partition_packages(packages, package_osdeps)
452
461
  gems = filter_uptodate_gems(gems)
453
462
  if osdeps.empty? && gems.empty?
454
463
  return
455
464
  end
456
465
 
457
- if automatic_osdeps_mode == AUTOMATIC && !os_def && !osdeps.empty?
466
+ if automatic_osdeps_mode == AUTOMATIC && !handled_os && !osdeps.empty?
458
467
  puts
459
468
  puts Autoproj.color("==============================", :bold)
460
469
  puts Autoproj.color("The packages that will be built require some other software to be installed", :bold)
@@ -480,7 +489,7 @@ module Autoproj
480
489
  end
481
490
 
482
491
  if automatic_osdeps_mode == ASK
483
- if !os_def
492
+ if !handled_os
484
493
  if gems.empty?
485
494
  # Nothing we can do, but the users required "ASK".
486
495
  # So, at least, let him press enter
@@ -532,7 +541,7 @@ module Autoproj
532
541
 
533
542
  did_something = false
534
543
 
535
- if os_def && !osdeps.empty?
544
+ if handled_os && !osdeps.empty?
536
545
  shell_script = generate_os_script(osdeps)
537
546
  if Autoproj.verbose
538
547
  Autoproj.progress "Installing non-ruby OS dependencies with"
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.6.0"
2
+ VERSION = "1.6.1.b1"
3
3
  end
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: 15
5
- prerelease: false
4
+ hash: 6629755
5
+ prerelease: true
6
6
  segments:
7
7
  - 1
8
8
  - 6
9
- - 0
10
- version: 1.6.0
9
+ - 1
10
+ - b1
11
+ version: 1.6.1.b1
11
12
  platform: ruby
12
13
  authors:
13
14
  - Sylvain Joyeux
@@ -15,7 +16,7 @@ autorequire:
15
16
  bindir: bin
16
17
  cert_chain: []
17
18
 
18
- date: 2010-08-16 00:00:00 +02:00
19
+ date: 2010-08-26 00:00:00 +02:00
19
20
  default_executable:
20
21
  dependencies:
21
22
  - !ruby/object:Gem::Dependency
@@ -273,12 +274,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
273
274
  required_rubygems_version: !ruby/object:Gem::Requirement
274
275
  none: false
275
276
  requirements:
276
- - - ">="
277
+ - - ">"
277
278
  - !ruby/object:Gem::Version
278
- hash: 3
279
+ hash: 25
279
280
  segments:
280
- - 0
281
- version: "0"
281
+ - 1
282
+ - 3
283
+ - 1
284
+ version: 1.3.1
282
285
  requirements: []
283
286
 
284
287
  rubyforge_project: autobuild