autoproj 1.12.6 → 1.13.0.b1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30982dc07e20775dc8e9e2a2dd5a3210445f02d1
4
- data.tar.gz: f3d8d1886e6c8ecd8140ba60c92e154de2c022a5
3
+ metadata.gz: 1d52be654ffd25aae59ee4d7142a32c3e87f7e97
4
+ data.tar.gz: 8e4668a6aa871d7a2e73784a731193aa176ef8f0
5
5
  SHA512:
6
- metadata.gz: 23a44919a79b9428768958e6a5d60940f12f22f81b0227957a3effe09784a7b39c4a08ed5a02b48c2430c6cea7b91d7f6f7afb6ddd2ffbf49d02b4847e344f1a
7
- data.tar.gz: ca149e32d50932a01db5a2ead6afc35aa367ed602eb20de2514fbb8ef9ba6f2e406b1a4d31aaf4ff86976f04a31966211e87036eac76e32013f787cdb6afce24
6
+ metadata.gz: ab7081988a90fbd4bcf8b12b0b349c25d8b84119165ce8acaacaf509b60245208ce51d5961e42925797180540af8d38ff171dc99ec9acd09e761039c67f97c45
7
+ data.tar.gz: c6704587e1cc8aa66dc197d87377edd3a0b5c28ade8bf2521c8184974fa961652b93362831edfca37871aabc4760dadc21adb52a39d190332be317670946ef1c
data/Manifest.txt CHANGED
@@ -10,16 +10,21 @@ bin/autoproj
10
10
  bin/autoproj-bootstrap
11
11
  bin/autoproj-cache
12
12
  bin/autoproj-clean
13
+ bin/autoproj-commit
13
14
  bin/autoproj-create-set
14
15
  bin/autoproj-doc
15
16
  bin/autoproj-envsh
16
17
  bin/autoproj-list
17
18
  bin/autoproj-locate
19
+ bin/autoproj-log
18
20
  bin/autoproj-query
21
+ bin/autoproj-reset
19
22
  bin/autoproj-show
20
23
  bin/autoproj-snapshot
21
24
  bin/autoproj-switch-config
25
+ bin/autoproj-tag
22
26
  bin/autoproj-test
27
+ bin/autoproj-versions
23
28
  bin/autoproj_bootstrap
24
29
  bin/autoproj_bootstrap.in
25
30
  bin/autoproj_stress_test
@@ -27,6 +32,12 @@ lib/autoproj.rb
27
32
  lib/autoproj/autobuild.rb
28
33
  lib/autoproj/base.rb
29
34
  lib/autoproj/build_option.rb
35
+ lib/autoproj/cli.rb
36
+ lib/autoproj/cli/reset.rb
37
+ lib/autoproj/cli/snapshot.rb
38
+ lib/autoproj/cli/tag.rb
39
+ lib/autoproj/cli/test.rb
40
+ lib/autoproj/cli/versions.rb
30
41
  lib/autoproj/cmdline.rb
31
42
  lib/autoproj/configuration.rb
32
43
  lib/autoproj/default.osdeps
@@ -40,6 +51,7 @@ lib/autoproj/ops/cache.rb
40
51
  lib/autoproj/ops/configuration.rb
41
52
  lib/autoproj/ops/loader.rb
42
53
  lib/autoproj/ops/main_config_switcher.rb
54
+ lib/autoproj/ops/snapshot.rb
43
55
  lib/autoproj/ops/tools.rb
44
56
  lib/autoproj/options.rb
45
57
  lib/autoproj/osdeps.rb
@@ -51,6 +63,7 @@ lib/autoproj/query.rb
51
63
  lib/autoproj/system.rb
52
64
  lib/autoproj/templates/create-set/packages.autobuild
53
65
  lib/autoproj/templates/create-set/source.yml
66
+ lib/autoproj/test.rb
54
67
  lib/autoproj/variable_expansion.rb
55
68
  lib/autoproj/vcs_definition.rb
56
69
  lib/autoproj/version.rb
@@ -74,6 +87,7 @@ test/data/os_release.with_quoted_and_unquoted_fields
74
87
  test/data/test_manifest/autoproj/local_set/local.autobuild
75
88
  test/data/test_manifest/autoproj/local_set/source.yml
76
89
  test/data/test_manifest/autoproj/manifest
90
+ test/ops/test_configuration.rb
77
91
  test/package_managers/apt-dpkg-status
78
92
  test/package_managers/apt-dpkg-status.installed-last
79
93
  test/package_managers/apt-dpkg-status.noninstalled-last
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ Utilrb::Rake.hoe do
18
18
  license 'BSD'
19
19
 
20
20
  extra_deps <<
21
- ['autobuild', '>= 1.7.0'] <<
21
+ ['autobuild', '~> 1.9', '>= 1.9.0'] <<
22
22
  ['utilrb', '>= 1.6.0'] <<
23
23
  ['highline', '>= 1.5.0']
24
24
  end
data/bin/autoproj CHANGED
@@ -1,5 +1,9 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
+ if !defined?(ORIGINAL_ARGV)
4
+ ORIGINAL_ARGV = ARGV.dup
5
+ end
6
+
3
7
  if RUBY_VERSION < "1.9.2"
4
8
  STDERR.puts "autoproj requires Ruby >= 1.9.2"
5
9
  exit 1
@@ -7,6 +7,22 @@ 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
+ Ops::Tools.load_autoprojrc
11
+
12
+ # Check if the .autoprojrc changed the PATH and therefore which autoproj script
13
+ # should be executed ... and restart if it did
14
+ autoproj_path = Autobuild.find_in_path('autoproj')
15
+ if $0 != autoproj_path
16
+ puts "your .autoprojrc file changed PATH in a way that requires the restart of autoproj"
17
+
18
+ if ENV['AUTOPROJ_RESTARTING']
19
+ puts "infinite loop detected, will not restart this time"
20
+ else
21
+ require 'rbconfig'
22
+ exec(Autoproj.config.ruby_executable, autoproj_path, *Autoproj::CmdLine.argv)
23
+ end
24
+ end
25
+
10
26
  Autoproj::CmdLine.report do
11
27
  switcher = Autoproj::Ops::MainConfigSwitcher.new(root_dir)
12
28
  begin
@@ -0,0 +1,10 @@
1
+ #! /bin/sh
2
+
3
+ set -e
4
+
5
+ cd $(autoproj locate)
6
+ autoproj versions --save
7
+ cd autoproj
8
+ git add overrides.d/50-versions.yml
9
+ git commit "$@"
10
+
data/bin/autoproj-list CHANGED
@@ -20,7 +20,7 @@ end
20
20
  all_packages = Hash.new
21
21
  package_sets = manifest.each_package_set.to_a
22
22
  package_sets.each do |pkg_set|
23
- pkg_set.each_autobuild_package.each do |pkg|
23
+ pkg_set.each_package do |pkg|
24
24
  all_packages[pkg.name] = [pkg, pkg_set.name]
25
25
  end
26
26
  end
@@ -36,8 +36,9 @@ Autoproj.message
36
36
  Autoproj.message("autoproj: package sets", :bold)
37
37
  package_sets.sort_by(&:name).each do |pkg_set|
38
38
  next if pkg_set.empty?
39
- if pkg_set.imported_from
40
- Autoproj.message " #{pkg_set.name} (imported by #{pkg_set.imported_from.name})"
39
+ if !pkg_set.imported_from.empty?
40
+ imported_from = pkg_set.imported_from.map(&:name).sort
41
+ Autoproj.message " #{pkg_set.name} (imported by #{imported_from.join(", ")})"
41
42
  else
42
43
  Autoproj.message " #{pkg_set.name} (listed in manifest)"
43
44
  end
data/bin/autoproj-log ADDED
@@ -0,0 +1,5 @@
1
+ #! /bin/sh
2
+
3
+ set -e
4
+ cd $(autolocate)/autoproj
5
+ git reflog autoproj --format="%Cgreen%gd %Cblue%cr %Creset%gs"
@@ -0,0 +1,13 @@
1
+ #! /usr/bin/env ruby
2
+ require 'autoproj/cli/reset'
3
+
4
+ Autoproj::CmdLine.report(silent: true) do
5
+ Autoproj.silent do
6
+ Autoproj::CmdLine.initialize_root_directory
7
+ Autoproj::CmdLine.initialize_and_load([])
8
+ end
9
+
10
+ cli = Autoproj::CLI::Reset.new(Autoproj.manifest)
11
+ ref_name, options = cli.parse_options(ARGV)
12
+ cli.run(ref_name, options)
13
+ end
data/bin/autoproj-show CHANGED
@@ -80,7 +80,9 @@ packages.each do |name|
80
80
  vcs = Autoproj.manifest.importer_definition_for(pkg_name)
81
81
 
82
82
  fragments = []
83
- if vcs.raw
83
+ if !vcs
84
+ fragments << ["has no VCS definition", []]
85
+ elsif vcs.raw
84
86
  first = true
85
87
  fragments << [nil, vcs_to_array(vcs)]
86
88
  vcs.raw.each do |pkg_set, vcs_info|
@@ -1,38 +1,27 @@
1
1
  #! /usr/bin/env ruby
2
+ require 'autoproj/cli/snapshot'
2
3
 
3
- require 'autoproj'
4
- require 'autoproj/cmdline'
5
-
6
- current_dir = Dir.pwd
7
- remaining_args = Autoproj.silent do
8
- Autoproj::CmdLine.initialize_root_directory
9
- Autoproj::CmdLine.initialize_and_load(ARGV)
10
- end
11
-
12
- snapshot_dir = File.expand_path(remaining_args.shift, current_dir)
13
- if !snapshot_dir
14
- raise ConfigError.new, "target directory missing\nusage: autoproj snapshot target_dir"
15
- end
16
-
17
- user_selection = remaining_args.map do |arg|
4
+ args = ARGV.map do |arg|
18
5
  if File.directory?(arg)
19
6
  File.expand_path(arg)
20
7
  else arg
21
8
  end
22
9
  end
23
- manifest = Autoproj.manifest
24
- Autoproj::CmdLine.report do
25
- resolved_selection = Autoproj::CmdLine.
26
- resolve_user_selection(user_selection, :filter => false)
27
- resolved_selection.filter_excluded_and_ignored_packages(Autoproj.manifest)
28
- # This calls #prepare, which is required to run build_packages
29
- packages = Autoproj::CmdLine.import_packages(resolved_selection)
30
- # Remove non-existing packages
31
- packages.each do |pkg|
32
- if !File.directory?(manifest.package(pkg).autobuild.srcdir)
33
- raise ConfigError, "cannot snapshot #{pkg.name} as it is not checked out"
34
- end
10
+
11
+ Autoproj::CmdLine.report(silent: true) do
12
+ Autoproj.silent do
13
+ Autoproj::CmdLine.initialize_root_directory
14
+ Autoproj::CmdLine.initialize_and_load([])
35
15
  end
36
- Autoproj::CmdLine.snapshot(Autoproj.manifest, snapshot_dir, packages)
37
- end
38
16
 
17
+ cli = Autoproj::CLI::Snapshot.new(Autoproj.manifest)
18
+ args, options = cli.parse_options(args)
19
+ if args.empty?
20
+ Autoproj.error "missing target directory on the command line"
21
+ exit 1
22
+ elsif args.size > 1
23
+ Autoproj.error "expected only one argument on the command line specifying the target directory"
24
+ exit 1
25
+ end
26
+ cli.run(args.first, options)
27
+ end
data/bin/autoproj-tag ADDED
@@ -0,0 +1,13 @@
1
+ #! /usr/bin/env ruby
2
+ require 'autoproj/cli/tag'
3
+
4
+ Autoproj::CmdLine.report(silent: true) do
5
+ Autoproj.silent do
6
+ Autoproj::CmdLine.initialize_root_directory
7
+ Autoproj::CmdLine.initialize_and_load([])
8
+ end
9
+
10
+ cli = Autoproj::CLI::Tag.new(Autoproj.manifest)
11
+ tag_name, options = cli.parse_options(ARGV)
12
+ cli.run(tag_name, options)
13
+ end
data/bin/autoproj-test CHANGED
@@ -1,36 +1,31 @@
1
1
  #! /usr/bin/env ruby
2
2
 
3
3
  require 'autoproj'
4
- require 'autoproj/cmdline'
4
+ require 'autoproj/cli/test'
5
5
 
6
- user_selection = Autoproj.silent do
7
- Autoproj::CmdLine.initialize_root_directory
8
- Autoproj::CmdLine.initialize_and_load(ARGV)
9
- end
10
-
11
- user_selection = user_selection.map do |arg|
6
+ argv = ARGV.map do |arg|
12
7
  if File.directory?(arg)
13
8
  File.expand_path(arg)
14
9
  else arg
15
10
  end
16
11
  end
17
12
 
13
+ Autoproj.silent do
14
+ Autoproj::CmdLine.initialize_root_directory
15
+ Autoproj::CmdLine.initialize_and_load([])
16
+ end
17
+
18
18
  Autobuild.pass_test_errors = true
19
19
  Autobuild.ignore_errors = true
20
20
 
21
- Autoproj::CmdLine.report do
22
- resolved_selection = Autoproj::CmdLine.
23
- resolve_user_selection(user_selection, :filter => false)
24
- # Remove non-existing packages
25
- Autoproj.manifest.each_autobuild_package do |pkg|
26
- if !File.directory?(pkg.srcdir)
27
- Autoproj.manifest.add_exclusion(pkg, "#{pkg.name} is not checked out")
28
- end
21
+ Autoproj::CmdLine.report(silent: true) do
22
+ cli = Autoproj::CLI::Test.new(Autoproj.manifest)
23
+ mode, user_selection, options = cli.parse_options(argv)
24
+
25
+ if mode == 'run'
26
+ cli.run(user_selection, options)
27
+ elsif mode == 'list'
28
+ cli.list(user_selection, options)
29
29
  end
30
- resolved_selection.filter_excluded_and_ignored_packages(Autoproj.manifest)
31
- # This calls #prepare, which is required to run build_packages
32
- packages = Autoproj::CmdLine.import_packages(resolved_selection)
33
- packages.each { |pkg| Autobuild::Package[pkg].disable_phases('import', 'prepare', 'install') }
34
- Autobuild.apply(packages, "autoproj-test", ['test'])
35
30
  end
36
31
 
@@ -0,0 +1,20 @@
1
+ #! /usr/bin/env ruby
2
+ require 'autoproj/cli/versions'
3
+
4
+ args = ARGV.map do |arg|
5
+ if File.directory?(arg)
6
+ File.expand_path(arg)
7
+ else arg
8
+ end
9
+ end
10
+
11
+ Autoproj::CmdLine.report(silent: true) do
12
+ Autoproj.silent do
13
+ Autoproj::CmdLine.initialize_root_directory
14
+ Autoproj::CmdLine.initialize_and_load([])
15
+ end
16
+
17
+ cli = Autoproj::CLI::Versions.new(Autoproj.manifest)
18
+ user_selection, options = cli.parse_options(args)
19
+ cli.run(user_selection, options)
20
+ end
@@ -444,13 +444,108 @@ module Autoproj
444
444
  end
445
445
  end
446
446
 
447
+ # Returns true if packages and prefixes should be auto-generated, based
448
+ # on the SHA of the package names. This is meant to be used for build
449
+ # services that want to check that dependencies are properly set
450
+ #
451
+ # The default is false (disabled)
452
+ #
453
+ # @return [Boolean]
447
454
  def randomize_layout?
448
455
  get('randomize_layout', false)
449
456
  end
450
457
 
458
+ # Sets whether the layout should be randomized
459
+ #
460
+ # @return [Boolean]
461
+ # @see randomize_layout?
451
462
  def randomize_layout=(value)
452
463
  set('randomize_layout', value, true)
453
464
  end
465
+
466
+ DEFAULT_UTILITY_SETUP = Hash[
467
+ 'doc' => true,
468
+ 'test' => false]
469
+
470
+ # The configuration key that should be used to store the utility
471
+ # enable/disable information
472
+ #
473
+ # @param [String] the utility name
474
+ # @return [String] the config key
475
+ def utility_key(utility)
476
+ "autoproj_#{utility}_utility"
477
+ end
478
+
479
+ # Returns whether a given utility is enabled for the package
480
+ #
481
+ # If there is no specific configuration for the package, uses the global
482
+ # default set with utility_enable_all or utility_disable_all. If none of
483
+ # these methods has been called, uses the default in
484
+ # {DEFAULT_UTILITY_SETUP}
485
+ #
486
+ # @param [String] utility the utility name (e.g. 'doc' or 'test')
487
+ # @param [String] package the package name
488
+ # @return [Boolean] true if the utility should be enabled for the
489
+ # requested package and false otherwise
490
+ def utility_enabled_for?(utility, package)
491
+ utility_config = get(utility_key(utility), Hash.new)
492
+ if utility_config.has_key?(package)
493
+ utility_config[package]
494
+ else get("#{utility_key(utility)}_default", DEFAULT_UTILITY_SETUP[utility])
495
+ end
496
+ end
497
+
498
+ # Enables a utility for all packages
499
+ #
500
+ # This both sets the default value for all packages and resets all
501
+ # package-specific values set with {utility_enable_for} and
502
+ # {utility_disable_for}
503
+ #
504
+ # @param [String] utility the utility name (e.g. 'doc' or 'test')
505
+ # @return [void]
506
+ def utility_enable_all(utility)
507
+ reset(utility_key(utility))
508
+ set("#{utility_key(utility)}_default", true)
509
+ end
510
+
511
+ # Enables a utility for a specific package
512
+ #
513
+ # Note that if the default for this utility is to be enabled, this is
514
+ # essentially a no-op.
515
+ #
516
+ # @param [String] utility the utility name (e.g. 'doc' or 'test')
517
+ # @param [String] package the package name
518
+ # @return [void]
519
+ def utility_enable_for(utility, package)
520
+ utility_config = get(utility_key(utility), Hash.new)
521
+ set(utility_key(utility), utility_config.merge(package => true))
522
+ end
523
+
524
+ # Disables a utility for all packages
525
+ #
526
+ # This both sets the default value for all packages and resets all
527
+ # package-specific values set with {utility_enable_for} and
528
+ # {utility_disable_for}
529
+ #
530
+ # @param [String] utility the utility name (e.g. 'doc' or 'test')
531
+ # @return [void]
532
+ def utility_disable_all(utility)
533
+ reset(utility_key(utility))
534
+ set("#{utility_key(utility)}_default", false)
535
+ end
536
+
537
+ # Disables a utility for a specific package
538
+ #
539
+ # Note that if the default for this utility is to be disabled, this is
540
+ # essentially a no-op.
541
+ #
542
+ # @param [String] utility the utility name (e.g. 'doc' or 'test')
543
+ # @param [String] package the package name
544
+ # @return [void]
545
+ def utility_disable_for(utility, package)
546
+ utility_config = get(utility_key(utility), Hash.new)
547
+ set(utility_key(utility), utility_config.merge(package => false))
548
+ end
454
549
  end
455
550
  end
456
551
 
@@ -832,6 +927,17 @@ fi
832
927
  "zypper -n install '%s'")
833
928
  end
834
929
 
930
+ def filter_uptodate_packages(packages)
931
+ result = `LANG=C rpm -q --whatprovides '#{packages.join("' '")}'`
932
+ has_all_pkgs = $?.success?
933
+
934
+ if !has_all_pkgs
935
+ return packages # let zypper filter, we need root now anyways
936
+ else
937
+ return []
938
+ end
939
+ end
940
+
835
941
  def install(packages)
836
942
  patterns, packages = packages.partition { |pkg| pkg =~ /^@/ }
837
943
  patterns = patterns.map { |str| str[1..-1] }
@@ -864,21 +970,21 @@ fi
864
970
  result = `LANG=C rpm -q --queryformat "%{NAME}\n" '#{packages.join("' '")}'`
865
971
 
866
972
  installed_packages = []
867
- new_packages = []
973
+ new_packages = []
868
974
  result.split("\n").each_with_index do |line, index|
869
- line = line.strip
975
+ line = line.strip
870
976
  if line =~ /package (.*) is not installed/
871
- package_name = $1
872
- if !packages.include?(package_name) # something is wrong, fallback to installing everything
873
- return packages
874
- end
977
+ package_name = $1
978
+ if !packages.include?(package_name) # something is wrong, fallback to installing everything
979
+ return packages
980
+ end
875
981
  new_packages << package_name
876
- else
877
- package_name = line.strip
878
- if !packages.include?(package_name) # something is wrong, fallback to installing everything
879
- return packages
880
- end
881
- installed_packages << package_name
982
+ else
983
+ package_name = line.strip
984
+ if !packages.include?(package_name) # something is wrong, fallback to installing everything
985
+ return packages
986
+ end
987
+ installed_packages << package_name
882
988
  end
883
989
  end
884
990
  new_packages
@@ -996,13 +1102,13 @@ fi
996
1102
  Autoproj.manifest.each_reused_autoproj_installation do |p|
997
1103
  p_gems = File.join(p, '.gems')
998
1104
  if File.directory?(p_gems)
999
- Autobuild.env_add_path 'GEM_PATH', p_gems
1000
- Autobuild.env_add_path 'PATH', File.join(p_gems, 'bin')
1105
+ Autobuild.env_push_path 'GEM_PATH', p_gems
1106
+ Autobuild.env_push_path 'PATH', File.join(p_gems, 'bin')
1001
1107
  end
1002
1108
  end
1003
- Autobuild.env_add_path 'GEM_PATH', gem_home
1109
+ Autobuild.env_push_path 'GEM_PATH', gem_home
1004
1110
  Autobuild.env_set 'GEM_HOME', gem_home
1005
- Autobuild.env_add_path 'PATH', "#{gem_home}/bin"
1111
+ Autobuild.env_push_path 'PATH', "#{gem_home}/bin"
1006
1112
 
1007
1113
  # Now, reset the directories in our own RubyGems instance
1008
1114
  Gem.paths = ENV
@@ -1012,6 +1118,7 @@ fi
1012
1118
  if cache = cache_dir
1013
1119
  gem_cache_dir = File.join(gem_home, 'cache')
1014
1120
  if !File.symlink?(gem_cache_dir) || File.readlink(gem_cache_dir) != cache
1121
+ FileUtils.mkdir_p gem_home
1015
1122
  FileUtils.rm_rf gem_cache_dir
1016
1123
  Autoproj.create_symlink(cache, gem_cache_dir)
1017
1124
  end
@@ -2563,23 +2670,26 @@ module Autoproj
2563
2670
  return @root_dir
2564
2671
  end
2565
2672
 
2566
- root_dir_rx =
2567
- if Autobuild.windows? then /^[a-zA-Z]:\\\\$/
2568
- else /^\/$/
2673
+ path = Pathname.pwd
2674
+ while !path.root?
2675
+ if (path + "autoproj" + 'manifest').file?
2676
+ break
2569
2677
  end
2570
-
2571
- while root_dir_rx !~ dir && !File.directory?(File.join(dir, "autoproj"))
2572
- dir = File.dirname(dir)
2678
+ path = path.parent
2573
2679
  end
2574
- if root_dir_rx =~ dir
2680
+
2681
+ if path.root?
2575
2682
  raise UserError, "not in a Autoproj installation"
2576
2683
  end
2577
2684
 
2578
- #Preventing backslashed in path, that might be confusing on some path compares
2685
+ result = path.to_s
2686
+ # I don't know if this is still useful or not ... but it does not hurt
2687
+ #
2688
+ # Preventing backslashed in path, that might be confusing on some path compares
2579
2689
  if Autobuild.windows?
2580
- dir = dir.gsub(/\\/,'/')
2690
+ result = result.gsub(/\\/,'/')
2581
2691
  end
2582
- dir
2692
+ result
2583
2693
  end
2584
2694
 
2585
2695
  # Returns the configuration directory for this autoproj installation.
@@ -2590,6 +2700,16 @@ module Autoproj
2590
2700
  File.join(root_dir, "autoproj")
2591
2701
  end
2592
2702
 
2703
+ OVERRIDES_DIR = "overrides.d"
2704
+
2705
+ # Returns the directory containing overrides files
2706
+ #
2707
+ # If the current directory is not in an autoproj installation,
2708
+ # raises UserError.
2709
+ def self.overrides_dir
2710
+ File.join(config_dir, OVERRIDES_DIR)
2711
+ end
2712
+
2593
2713
  # @deprecated use Autobuild.find_in_path instead
2594
2714
  #
2595
2715
  # Warning: the autobuild method returns nil (instead of raising) if the
@@ -2945,6 +3065,8 @@ pip:
2945
3065
  arch: python2-pip
2946
3066
  opensuse: python-pip
2947
3067
  fedora: python-pip
3068
+ sudo:
3069
+ default: sudo
2948
3070
 
2949
3071
  EODEFS
2950
3072
 
@@ -2976,7 +3098,7 @@ rescue Autoproj::ConfigError => e
2976
3098
  end
2977
3099
 
2978
3100
  # Now try to find out the name of the gem binary
2979
- PACKAGES = []
3101
+ PACKAGES = ['build-essential', 'sudo']
2980
3102
 
2981
3103
  STDERR.puts "autoproj: installing autoproj and its dependencies (this can take a long time)"
2982
3104
  # First install the dependencies of autoproj, as we don't want them to be
@@ -3009,7 +3131,6 @@ if ARGV.first != "localdev"
3009
3131
  ARGV.shift
3010
3132
  end
3011
3133
  begin
3012
- osdeps_management.install(['build-essential'])
3013
3134
  osdeps_management.install(['autobuild'])
3014
3135
  osdeps_management.install(['autoproj'])
3015
3136
  rescue Autoproj::ConfigError => e