autoproj 2.0.0.rc14 → 2.0.0.rc15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/autoproj_bootstrap +0 -1
- data/bin/autoproj_install +0 -1
- data/lib/autoproj.rb +1 -1
- data/lib/autoproj/autobuild.rb +1 -1
- data/lib/autoproj/cli/base.rb +52 -16
- data/lib/autoproj/cli/clean.rb +0 -1
- data/lib/autoproj/cli/inspection_tool.rb +1 -1
- data/lib/autoproj/cli/update.rb +1 -0
- data/lib/autoproj/default.osdeps +1 -1
- data/lib/autoproj/find_workspace.rb +11 -2
- data/lib/autoproj/git_server_configuration.rb +4 -2
- data/lib/autoproj/gitorious.rb +0 -2
- data/lib/autoproj/manifest.rb +84 -32
- data/lib/autoproj/options.rb +12 -24
- data/lib/autoproj/os_package_resolver.rb +4 -11
- data/lib/autoproj/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72bfb787ad1c7703f07969b97c019c9fd49dc3ec
|
4
|
+
data.tar.gz: 830d1225e29863caecdbbdea21b40a80975c61c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2558027c520e214fa512cb70efb99d95bc69c342ff864a16c9a23ff64e75972a085f70d62bd95e6cb08282379e15741cdfc22af70fdcc5a7d1f979a37479b392
|
7
|
+
data.tar.gz: 77c978c7afe274015b889a868a1514abb24ec515e6a13a9045b4747f9718120a0f18b293064efa3d2064d1dad626ec7ecbd6c750f8e114789b6b61f3dfda05d9
|
data/bin/autoproj_bootstrap
CHANGED
data/bin/autoproj_install
CHANGED
data/lib/autoproj.rb
CHANGED
@@ -54,7 +54,7 @@ def self.warn_deprecated_level
|
|
54
54
|
def self.warn_deprecated_level=(level)
|
55
55
|
@warn_deprecated_level = level
|
56
56
|
end
|
57
|
-
@warn_deprecated_level =
|
57
|
+
@warn_deprecated_level = 1
|
58
58
|
|
59
59
|
def self.warn_deprecated(method, msg, level = 0)
|
60
60
|
if level >= @warn_deprecated_level
|
data/lib/autoproj/autobuild.rb
CHANGED
data/lib/autoproj/cli/base.rb
CHANGED
@@ -6,6 +6,9 @@ module CLI
|
|
6
6
|
class Base
|
7
7
|
include Ops::Tools
|
8
8
|
|
9
|
+
# The underlying workspace
|
10
|
+
#
|
11
|
+
# @return [Workspace]
|
9
12
|
attr_reader :ws
|
10
13
|
|
11
14
|
def initialize(ws = nil)
|
@@ -44,14 +47,20 @@ def normalize_command_line_package_selection(selection)
|
|
44
47
|
return selection, config_selected
|
45
48
|
end
|
46
49
|
|
47
|
-
|
50
|
+
# Resolve a user-provided selection
|
51
|
+
#
|
52
|
+
# @param (see expand_package_selection)
|
53
|
+
# @return [(PackageSelection,Array<String>)] the resolved selections
|
54
|
+
# and the list of entries in selected_packages that have not been
|
55
|
+
# resolved
|
56
|
+
def resolve_user_selection(selected_packages, **options)
|
48
57
|
if selected_packages.empty?
|
49
58
|
return ws.manifest.default_packages
|
50
59
|
end
|
51
60
|
selected_packages = selected_packages.to_set
|
52
61
|
|
53
62
|
selected_packages, nonresolved = ws.manifest.
|
54
|
-
expand_package_selection(selected_packages, options)
|
63
|
+
expand_package_selection(selected_packages, **options)
|
55
64
|
|
56
65
|
# Try to auto-add stuff if nonresolved
|
57
66
|
nonresolved.delete_if do |sel|
|
@@ -80,29 +89,56 @@ def resolve_user_selection(selected_packages, options = Hash.new)
|
|
80
89
|
return selected_packages, nonresolved
|
81
90
|
end
|
82
91
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
92
|
+
# Resolves the user-provided selection into the set of packages that
|
93
|
+
# should be processed further
|
94
|
+
#
|
95
|
+
# While {#resolve_user_selection} really only considers packages and
|
96
|
+
# strings, this methods takes care of doing recursive resolution of
|
97
|
+
# dependencies, as well as splitting the packages into source and
|
98
|
+
# osdep packages.
|
99
|
+
#
|
100
|
+
# It loads the packages in sequence (that's the only way the full
|
101
|
+
# selection can be computed), and is therefore responsible for
|
102
|
+
# updating the packages if needed (disabled by default)
|
103
|
+
#
|
104
|
+
# @param [Array<String>] user_selection the selection provided by
|
105
|
+
# the user
|
106
|
+
# @param [Boolean] checkout_only if packages should be updated
|
107
|
+
# (false) or only missing packages should be checked out (the
|
108
|
+
# default)
|
109
|
+
# @param [Boolean] only_local if the update/checkout operation is
|
110
|
+
# allowed to access the network. If only_local is true but some
|
111
|
+
# packages should be checked out, the update will fail
|
112
|
+
# @param [Boolean] recursive whether the resolution should be done
|
113
|
+
# recursively (i.e. dependencies of directly selected packages
|
114
|
+
# should be added) or not
|
115
|
+
# @param [Boolean] ignore_non_imported_packages whether packages
|
116
|
+
# that are not imported should simply be ignored. Setting
|
117
|
+
# checkout_only to true and ignore_non_imported_packages to true
|
118
|
+
# guarantees in effect that no import operation will take place,
|
119
|
+
# only loading
|
120
|
+
# @return [(Array<String>,Array<String>,PackageSelection)] the list
|
121
|
+
# of selected source packages, the list of selected OS packages and
|
122
|
+
# the package selection resolution object
|
123
|
+
#
|
124
|
+
# @see resolve_user_selection
|
125
|
+
def resolve_selection(user_selection, checkout_only: true, only_local: false, recursive: true, ignore_non_imported_packages: false)
|
90
126
|
resolved_selection, _ = resolve_user_selection(user_selection, filter: false)
|
91
|
-
if
|
92
|
-
manifest.each_autobuild_package do |pkg|
|
127
|
+
if ignore_non_imported_packages
|
128
|
+
ws.manifest.each_autobuild_package do |pkg|
|
93
129
|
if !File.directory?(pkg.srcdir)
|
94
|
-
manifest.ignore_package(pkg.name)
|
130
|
+
ws.manifest.ignore_package(pkg.name)
|
95
131
|
end
|
96
132
|
end
|
97
133
|
end
|
98
|
-
resolved_selection.filter_excluded_and_ignored_packages(manifest)
|
134
|
+
resolved_selection.filter_excluded_and_ignored_packages(ws.manifest)
|
99
135
|
|
100
136
|
ops = Ops::Import.new(ws)
|
101
137
|
source_packages, osdep_packages = ops.import_packages(
|
102
138
|
resolved_selection,
|
103
|
-
checkout_only:
|
104
|
-
only_local:
|
105
|
-
recursive:
|
139
|
+
checkout_only: checkout_only,
|
140
|
+
only_local: only_local,
|
141
|
+
recursive: recursive,
|
106
142
|
warn_about_ignored_packages: false)
|
107
143
|
|
108
144
|
return source_packages, osdep_packages, resolved_selection
|
data/lib/autoproj/cli/clean.rb
CHANGED
@@ -18,7 +18,6 @@ def run(selection, options = Hash.new)
|
|
18
18
|
initialize_and_load
|
19
19
|
packages, _ = normalize_command_line_package_selection(selection)
|
20
20
|
source_packages, * = resolve_selection(
|
21
|
-
ws.manifest,
|
22
21
|
selection,
|
23
22
|
recursive: false,
|
24
23
|
ignore_non_imported_packages: true)
|
@@ -46,7 +46,7 @@ def finalize_setup(packages = [], options = Hash.new)
|
|
46
46
|
resolve_user_selection(packages)
|
47
47
|
ws.finalize_package_setup
|
48
48
|
source_packages, osdep_packages, resolved_selection =
|
49
|
-
resolve_selection(
|
49
|
+
resolve_selection(packages, options)
|
50
50
|
ws.finalize_setup
|
51
51
|
ws.export_installation_manifest
|
52
52
|
return source_packages, osdep_packages, resolved_selection, config_selected
|
data/lib/autoproj/cli/update.rb
CHANGED
@@ -35,6 +35,7 @@ def validate_options(packages, options)
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def run(selected_packages, options)
|
38
|
+
ws.manifest.accept_unavailable_osdeps = !options[:osdeps]
|
38
39
|
explicit_selection = !selected_packages.empty?
|
39
40
|
selected_packages, config_selected =
|
40
41
|
normalize_command_line_package_selection(selected_packages)
|
data/lib/autoproj/default.osdeps
CHANGED
@@ -34,7 +34,7 @@ def self.find_prefix_dir(base_dir = default_find_base_dir)
|
|
34
34
|
# @return [String,nil] the root of the workspace directory, or nil if
|
35
35
|
# there's none
|
36
36
|
def self.find_v2_root_dir(base_dir, config_field_name)
|
37
|
-
path = Pathname.new(base_dir)
|
37
|
+
path = Pathname.new(base_dir).expand_path
|
38
38
|
while !path.root?
|
39
39
|
if (path + ".autoproj").exist?
|
40
40
|
break
|
@@ -50,7 +50,16 @@ def self.find_v2_root_dir(base_dir, config_field_name)
|
|
50
50
|
if config_path.exist?
|
51
51
|
config = YAML.load(config_path.read) || Hash.new
|
52
52
|
result = config[config_field_name] || path.to_s
|
53
|
-
File.expand_path(result, path.to_s)
|
53
|
+
result = File.expand_path(result, path.to_s)
|
54
|
+
if result == path.to_s
|
55
|
+
return result
|
56
|
+
end
|
57
|
+
resolved = find_v2_root_dir(result, config_field_name)
|
58
|
+
|
59
|
+
if !resolved || (resolved != result)
|
60
|
+
raise ArgumentError, "found #{path} as possible workspace root for #{base_dir}, but it contains a configuration file in #{config_path} that points to #{result} and #{result} is not an autoproj workspace root"
|
61
|
+
end
|
62
|
+
resolved
|
54
63
|
else
|
55
64
|
path.to_s
|
56
65
|
end
|
@@ -106,8 +106,10 @@ def self.git_server_configuration(name, base_url, options = Hash.new)
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def self.gitorious_server_configuration(name, base_url, options = Hash.new)
|
109
|
-
Autoproj.
|
110
|
-
|
109
|
+
Autoproj.warn_deprecated "gitorious_server_configuration",
|
110
|
+
"use require 'git_server_configuration' and
|
111
|
+
Autoproj.git_server_configuration instead. note that the method call
|
112
|
+
interface has not changed, you just have to change the name(s)"
|
111
113
|
git_server_configuration(name, base_url, options)
|
112
114
|
end
|
113
115
|
end
|
data/lib/autoproj/gitorious.rb
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
Autoproj.warn "gitorious_server_configuration is deprecated, use require 'git_server_configuration' and Autoproj.git_server_configuration instead"
|
2
|
-
Autoproj.warn "note that the method call interface has not changed, you just have to change the name(s)"
|
3
1
|
require 'autoproj/git_server_configuration'
|
data/lib/autoproj/manifest.rb
CHANGED
@@ -71,6 +71,15 @@ def load(file)
|
|
71
71
|
# A set of other autoproj installations that are being reused
|
72
72
|
attr_reader :reused_installations
|
73
73
|
|
74
|
+
# Whether {#resolve_package_name} should raise if an osdep is found that
|
75
|
+
# is not available on the current operating system, or simply return it
|
76
|
+
#
|
77
|
+
# @return [Boolean]
|
78
|
+
def accept_unavailable_osdeps?; !!@accept_unavailable_osdeps end
|
79
|
+
|
80
|
+
# Sets {#accept_unavailable_osdeps?}
|
81
|
+
def accept_unavailable_osdeps=(flag); @accept_unavailable_osdeps = flag end
|
82
|
+
|
74
83
|
# True if osdeps should be handled in update and build, or left to the
|
75
84
|
# osdeps command
|
76
85
|
def auto_osdeps?
|
@@ -108,6 +117,7 @@ def initialize
|
|
108
117
|
@reused_installations = Array.new
|
109
118
|
@ignored_packages = Set.new
|
110
119
|
@manifest_exclusions = Set.new
|
120
|
+
@accept_unavailable_osdeps = false
|
111
121
|
|
112
122
|
@constant_definitions = Hash.new
|
113
123
|
@package_sets << LocalPackageSet.new(self)
|
@@ -334,14 +344,21 @@ def register_package_set(pkg_set)
|
|
334
344
|
end
|
335
345
|
|
336
346
|
# Register a new package
|
337
|
-
|
338
|
-
|
347
|
+
#
|
348
|
+
# @param [Autobuild::Package] package
|
349
|
+
# @param [#call,nil] block a setup block
|
350
|
+
# @param [PackageSet] package_set the package set that defines the package
|
351
|
+
# @param [String] file the file in which the package is defined
|
352
|
+
# @return [PackageDefinition]
|
353
|
+
def register_package(package, block = nil, package_set = main_package_set, file = nil)
|
354
|
+
pkg = PackageDefinition.new(package, package_set, file)
|
339
355
|
if block
|
340
356
|
pkg.add_setup_block(block)
|
341
357
|
end
|
342
358
|
@packages[package.name] = pkg
|
343
|
-
|
344
|
-
|
359
|
+
metapackage pkg.package_set.name, pkg.autobuild
|
360
|
+
metapackage "#{pkg.package_set.name}.all", pkg.autobuild
|
361
|
+
pkg
|
345
362
|
end
|
346
363
|
|
347
364
|
# Returns the package set that defines a package
|
@@ -538,14 +555,22 @@ def main_package_set
|
|
538
555
|
each_package_set.find(&:main?)
|
539
556
|
end
|
540
557
|
|
541
|
-
# Resolves
|
542
|
-
# source or the name of a package.
|
543
|
-
#
|
544
|
-
# The returned value is a list of pairs:
|
558
|
+
# Resolves a name into a set of source and osdep packages
|
545
559
|
#
|
546
|
-
#
|
560
|
+
# @param [String] name the name to be resolved. It can either be the
|
561
|
+
# name of a source package, an osdep package or a metapackage (e.g.
|
562
|
+
# package set).
|
547
563
|
#
|
548
|
-
#
|
564
|
+
# @return [nil,Array] either nil if there is no such osdep, or a list of
|
565
|
+
# (type, package_name) pairs where type is either :package or :osdep and
|
566
|
+
# package_name the corresponding package name
|
567
|
+
# @raise [PackageNotFound] if the given package name cannot be resolved
|
568
|
+
# into a package. If {#accept_unavailable_osdeps?} is false (the
|
569
|
+
# default), the exception will be raised if the package is known to be
|
570
|
+
# an osdep, but it is not available on the local operating system (as
|
571
|
+
# defined by {#os_package_resolver}), and there has been no source
|
572
|
+
# fallback defined with {#add_osdeps_overrides}. If true, it will
|
573
|
+
# return such a package as an osdep.
|
549
574
|
def resolve_package_name(name)
|
550
575
|
if pkg_set = find_metapackage(name)
|
551
576
|
pkg_names = pkg_set.each_package.map(&:name)
|
@@ -557,8 +582,8 @@ def resolve_package_name(name)
|
|
557
582
|
pkg_names.each do |pkg|
|
558
583
|
begin
|
559
584
|
result.concat(resolve_single_package_name(pkg))
|
560
|
-
rescue PackageNotFound
|
561
|
-
raise PackageNotFound, "cannot resolve #{pkg}:
|
585
|
+
rescue PackageNotFound => e
|
586
|
+
raise PackageNotFound, "cannot resolve #{pkg}: #{e}", e.backtrace
|
562
587
|
end
|
563
588
|
end
|
564
589
|
result
|
@@ -585,6 +610,8 @@ def resolve_packages_dependencies(*root_names)
|
|
585
610
|
result
|
586
611
|
end
|
587
612
|
|
613
|
+
# @api private
|
614
|
+
#
|
588
615
|
# Resolves a package name, where +name+ cannot be resolved as a
|
589
616
|
# metapackage
|
590
617
|
#
|
@@ -604,6 +631,16 @@ def resolve_single_package_name(name)
|
|
604
631
|
end
|
605
632
|
end
|
606
633
|
|
634
|
+
# @api private
|
635
|
+
#
|
636
|
+
# Resolve a package name that is assumed to be a source package
|
637
|
+
#
|
638
|
+
# @param [String] name the name to be resolved
|
639
|
+
# @return [nil,Array] either nil if there is no such osdep, or a list of
|
640
|
+
# (type, package_name) pairs where type is either :package or :osdep and
|
641
|
+
# package_name the corresponding package name
|
642
|
+
# @raise PackageNotFound if the given package name cannot be resolved
|
643
|
+
# into a package
|
607
644
|
def resolve_package_name_as_source_package(name)
|
608
645
|
if pkg = find_autobuild_package(name)
|
609
646
|
return [[:package, pkg.name]]
|
@@ -620,10 +657,17 @@ def resolve_package_name_as_source_package(name)
|
|
620
657
|
# @return [nil,Array] either nil if there is no such osdep, or a list of
|
621
658
|
# (type, package_name) pairs where type is either :package or :osdep and
|
622
659
|
# package_name the corresponding package name
|
660
|
+
# @raise PackageNotFound if the given package name cannot be resolved
|
661
|
+
# into a package. If {#accept_unavailable_osdeps?} is false (the
|
662
|
+
# default), the exception will be raised if the package is known to be
|
663
|
+
# an osdep, but it is not available on the local operating system (as
|
664
|
+
# defined by {#os_package_resolver}), and there has been no source
|
665
|
+
# fallback defined with {#add_osdeps_overrides}.
|
666
|
+
# If true, it will return it as an osdep.
|
623
667
|
def resolve_package_name_as_osdep(name)
|
624
668
|
osdeps_availability = os_package_resolver.availability_of(name)
|
625
669
|
if osdeps_availability == OSPackageResolver::NO_PACKAGE
|
626
|
-
raise PackageNotFound, "
|
670
|
+
raise PackageNotFound, "#{name} is not an osdep"
|
627
671
|
end
|
628
672
|
|
629
673
|
# There is an osdep definition for this package, check the
|
@@ -638,7 +682,7 @@ def resolve_package_name_as_osdep(name)
|
|
638
682
|
end.uniq
|
639
683
|
elsif !osdeps_available && (pkg = find_autobuild_package(name))
|
640
684
|
return [[:package, pkg.name]]
|
641
|
-
elsif osdeps_available
|
685
|
+
elsif osdeps_available || accept_unavailable_osdeps?
|
642
686
|
return [[:osdeps, name]]
|
643
687
|
elsif osdeps_availability == OSPackageResolver::WRONG_OS
|
644
688
|
raise PackageNotFound, "#{name} is an osdep, but it is not available for this operating system"
|
@@ -670,23 +714,33 @@ def find_metapackage(name)
|
|
670
714
|
@metapackages[name.to_s]
|
671
715
|
end
|
672
716
|
|
673
|
-
#
|
674
|
-
#
|
675
|
-
# metapackage 'meta_name', 'pkg1', 'pkg2' => Metapackage
|
717
|
+
# Add packages to a metapackage, creating the metapackage if it does not
|
718
|
+
# exist
|
676
719
|
#
|
677
|
-
#
|
720
|
+
# @overload metapackage(name)
|
721
|
+
# Create a metapackage
|
678
722
|
#
|
679
|
-
#
|
680
|
-
#
|
723
|
+
# @return [Metapackage]
|
724
|
+
#
|
725
|
+
# @overload metapackage(name, *packages)
|
726
|
+
# Add packages to a new or existing metapackage
|
727
|
+
#
|
728
|
+
# @param [String] name the name of the metapackage. If it already
|
729
|
+
# exists, the packages will be added to it.
|
730
|
+
# @param [String] packages list of package names to be added to the
|
731
|
+
# metapackage
|
732
|
+
# @return [Metapackage]
|
681
733
|
#
|
682
|
-
# In the second form, adds the listed packages to the metapackage and
|
683
|
-
# returns the Metapackage instance
|
684
734
|
def metapackage(name, *packages, &block)
|
685
735
|
meta = (@metapackages[name.to_s] ||= Metapackage.new(name))
|
686
|
-
packages.each do |
|
687
|
-
|
688
|
-
|
689
|
-
|
736
|
+
packages.each do |pkg|
|
737
|
+
if pkg.respond_to?(:to_str)
|
738
|
+
package_names = resolve_package_set(pkg)
|
739
|
+
package_names.each do |pkg_name|
|
740
|
+
meta.add(find_autobuild_package(pkg_name))
|
741
|
+
end
|
742
|
+
else
|
743
|
+
meta.add(pkg)
|
690
744
|
end
|
691
745
|
end
|
692
746
|
|
@@ -982,14 +1036,12 @@ def filter_os_packages(required_os_packages, package_os_deps)
|
|
982
1036
|
#
|
983
1037
|
# The :force option allows to force the usage of the source package(s),
|
984
1038
|
# regardless of the availability of the osdeps package.
|
985
|
-
def add_osdeps_overrides(osdeps_name,
|
986
|
-
|
987
|
-
|
988
|
-
options[:packages] << pkg
|
1039
|
+
def add_osdeps_overrides(osdeps_name, package: osdeps_name, packages: [], force: false)
|
1040
|
+
if package
|
1041
|
+
packages << package
|
989
1042
|
end
|
990
|
-
packages = options[:packages]
|
991
1043
|
packages.each { |pkg_name| resolve_package_name(pkg_name) }
|
992
|
-
@osdeps_overrides[osdeps_name.to_s] =
|
1044
|
+
@osdeps_overrides[osdeps_name.to_s] = Hash[packages: packages, force: force]
|
993
1045
|
end
|
994
1046
|
|
995
1047
|
# Remove any OSDeps override that has previously been added with
|
data/lib/autoproj/options.rb
CHANGED
@@ -1,74 +1,62 @@
|
|
1
1
|
module Autoproj
|
2
2
|
# @deprecated use config.override instead
|
3
3
|
def self.override_option(option_name, value)
|
4
|
-
Autoproj.
|
5
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
4
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
6
5
|
config.override(option_name, value)
|
7
6
|
end
|
8
7
|
# @deprecated use config.reset instead
|
9
8
|
def self.reset_option(key)
|
10
|
-
Autoproj.
|
11
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
9
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
12
10
|
config.reset(key)
|
13
11
|
end
|
14
12
|
# @deprecated use config.set(key, value, user_validated) instead
|
15
13
|
def self.change_option(key, value, user_validated = false)
|
16
|
-
Autoproj.
|
17
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
14
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
18
15
|
config.set(key, value, user_validated)
|
19
16
|
end
|
20
17
|
# @deprecated use config.validated_values instead
|
21
18
|
def self.option_set
|
22
|
-
Autoproj.
|
23
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
19
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
24
20
|
config.validated_values
|
25
21
|
end
|
26
22
|
# @deprecated use config.get(key) instead
|
27
23
|
def self.user_config(key)
|
28
|
-
Autoproj.
|
29
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
24
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
30
25
|
config.get(key)
|
31
26
|
end
|
32
27
|
# @deprecated use config.declare(name, type, options, &validator) instead
|
33
28
|
def self.configuration_option(name, type, options, &validator)
|
34
|
-
Autoproj.
|
35
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
29
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
36
30
|
config.declare(name, type, options, &validator)
|
37
31
|
end
|
38
32
|
# @deprecated use config.declared?(name, type, options, &validator) instead
|
39
33
|
def self.declared_option?(name)
|
40
|
-
Autoproj.
|
41
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
34
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
42
35
|
config.declared?(name)
|
43
36
|
end
|
44
37
|
# @deprecated use config.configure(option_name) instead
|
45
38
|
def self.configure(option_name)
|
46
|
-
Autoproj.
|
47
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
39
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
48
40
|
config.configure(option_name)
|
49
41
|
end
|
50
42
|
# @deprecated use config.has_value_for?(name)
|
51
43
|
def self.has_config_key?(name)
|
52
|
-
Autoproj.
|
53
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
44
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
54
45
|
config.has_value_for?(name)
|
55
46
|
end
|
56
47
|
# @deprecated use config.shell_helpers? instead
|
57
48
|
def self.shell_helpers?
|
58
|
-
Autoproj.
|
59
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
49
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
60
50
|
config.shell_helpers?
|
61
51
|
end
|
62
52
|
# @deprecated use config.shell_helpers= instead
|
63
53
|
def self.shell_helpers=(flag)
|
64
|
-
Autoproj.
|
65
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
54
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
66
55
|
config.shell_helpers = flag
|
67
56
|
end
|
68
57
|
|
69
58
|
def self.save_config
|
70
|
-
Autoproj.
|
71
|
-
caller.each { |bt| Autoproj.warn " #{bt}" }
|
59
|
+
Autoproj.warn_deprecated __method__, "use the API on Autoproj.config (from Autoproj::Configuration) instead"
|
72
60
|
config.save
|
73
61
|
end
|
74
62
|
|
@@ -139,10 +139,8 @@ def os_package_manager
|
|
139
139
|
if !instance_variable_defined?(:@os_package_manager)
|
140
140
|
os_names, _ = operating_system
|
141
141
|
os_name = os_names.find { |name| OS_PACKAGE_MANAGERS[name] }
|
142
|
-
@os_package_manager = OS_PACKAGE_MANAGERS[os_name]
|
143
|
-
|
144
|
-
raise "unsupported OS #{os_names.join(", ")}"
|
145
|
-
end
|
142
|
+
@os_package_manager = OS_PACKAGE_MANAGERS[os_name] ||
|
143
|
+
'unknown'
|
146
144
|
end
|
147
145
|
return @os_package_manager
|
148
146
|
end
|
@@ -691,11 +689,8 @@ def resolve_os_packages(dependencies)
|
|
691
689
|
end
|
692
690
|
|
693
691
|
if result.empty?
|
694
|
-
|
695
|
-
|
696
|
-
raise MissingOSDep.new, "there is an osdeps definition for #{name}, but not for this operating system and version (resp. #{os_names.join(", ")} and #{os_versions.join(", ")})"
|
697
|
-
end
|
698
|
-
result = [[os_package_manager, FOUND_PACKAGES, [name]]]
|
692
|
+
os_names, os_versions = operating_system
|
693
|
+
raise MissingOSDep.new, "there is an osdeps definition for #{name}, but not for this operating system and version (resp. #{os_names.join(", ")} and #{os_versions.join(", ")})"
|
699
694
|
end
|
700
695
|
|
701
696
|
result.each do |handler, status, packages|
|
@@ -763,8 +758,6 @@ def availability_of(name)
|
|
763
758
|
if resolved.empty?
|
764
759
|
if !operating_system
|
765
760
|
return UNKNOWN_OS
|
766
|
-
elsif !supported_operating_system?
|
767
|
-
return AVAILABLE
|
768
761
|
else return WRONG_OS
|
769
762
|
end
|
770
763
|
end
|
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: 2.0.0.
|
4
|
+
version: 2.0.0.rc15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: autobuild
|
@@ -292,3 +292,4 @@ signing_key:
|
|
292
292
|
specification_version: 4
|
293
293
|
summary: Easy installation and management of sets of software packages
|
294
294
|
test_files: []
|
295
|
+
has_rdoc:
|