autoproj 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/bin/autoproj +31 -22
- data/lib/autoproj/manifest.rb +3 -9
- data/lib/autoproj/osdeps.rb +19 -16
- data/lib/autoproj/version.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
= Version 1.3.3
|
2
|
+
* Fix: some configuration options were not properly saved
|
3
|
+
* Fix: env.sh was messed up by partial builds (builds where a directory and/or
|
4
|
+
package name is specified)
|
5
|
+
* Fix: accept subdirectories of packages as argument to builds
|
6
|
+
|
1
7
|
= Version 1.3.2
|
2
8
|
* Fix: GEM_HOME/bin was not added to env.sh
|
3
9
|
|
data/bin/autoproj
CHANGED
@@ -507,17 +507,18 @@ report(debug) do
|
|
507
507
|
Autoproj.load_if_present(source, source.local_dir, "overrides.rb")
|
508
508
|
end
|
509
509
|
|
510
|
-
# The user is asked for configuration values both during the manifest
|
511
|
-
# loading and the loading of autobuild files. Save it now.
|
512
|
-
Autoproj.save_config
|
513
|
-
|
514
510
|
# Now, load the package's importer configurations (from the various
|
515
511
|
# source.yml files)
|
516
512
|
manifest.load_importers
|
513
|
+
|
514
|
+
# Configuration is finished, so all relevant configuration options should
|
515
|
+
# have been asked to the user. Save it.
|
516
|
+
Autoproj.save_config
|
517
|
+
|
517
518
|
if Autoproj.verbose
|
518
519
|
# List defined packages, and in which autobuild files they are defined
|
519
520
|
STDERR.puts "Available packages:"
|
520
|
-
|
521
|
+
manifest.packages.each_value do |package, source, file|
|
521
522
|
STDERR.puts " #{package.name}: #{file} from #{source.name}"
|
522
523
|
end
|
523
524
|
end
|
@@ -546,12 +547,12 @@ report(debug) do
|
|
546
547
|
|
547
548
|
lines = []
|
548
549
|
source.each_package.
|
549
|
-
map { |pkg| [pkg.name,
|
550
|
+
map { |pkg| [pkg.name, manifest.package_manifests[pkg.name]] }.
|
550
551
|
sort_by { |name, _| name }.
|
551
|
-
each do |name,
|
552
|
-
vcs_def =
|
553
|
-
if
|
554
|
-
lines << [name,
|
552
|
+
each do |name, source_manifest|
|
553
|
+
vcs_def = manifest.importer_definition_for(name)
|
554
|
+
if source_manifest
|
555
|
+
lines << [name, source_manifest.short_documentation]
|
555
556
|
lines << ["", vcs_def.to_s]
|
556
557
|
else
|
557
558
|
lines << [name, vcs_def.to_s]
|
@@ -578,10 +579,7 @@ report(debug) do
|
|
578
579
|
# Create the build target from the manifest if the user did not provide an
|
579
580
|
# explicit one
|
580
581
|
if selected_packages.empty?
|
581
|
-
selected_packages =
|
582
|
-
end
|
583
|
-
if Autoproj.verbose
|
584
|
-
STDERR.puts "will install #{selected_packages.to_a.join(", ")}"
|
582
|
+
selected_packages = manifest.default_packages
|
585
583
|
end
|
586
584
|
if selected_packages.empty? # no packages, terminate
|
587
585
|
STDERR.puts
|
@@ -596,15 +594,20 @@ report(debug) do
|
|
596
594
|
#
|
597
595
|
# First, we allow to user to specify packages based on disk paths, so
|
598
596
|
# resolve those
|
599
|
-
selected_packages =
|
597
|
+
selected_packages = manifest.expand_package_selection(selected_packages)
|
598
|
+
if selected_packages.empty?
|
599
|
+
STDERR.puts color("autoproj: wrong packages selection on command line", :red)
|
600
|
+
exit 0
|
601
|
+
elsif Autoproj.verbose
|
602
|
+
STDERR.puts "will install #{selected_packages.to_a.join(", ")}"
|
603
|
+
end
|
600
604
|
seen = Set.new
|
601
|
-
|
605
|
+
manifest.each_package_set do |name, packages, enabled_packages|
|
602
606
|
packages -= seen
|
603
607
|
|
604
608
|
srcdir = File.join(Autoproj.root_dir, name)
|
605
609
|
prefix = File.join(Autoproj.build_dir, name)
|
606
610
|
logdir = File.join(prefix, "log")
|
607
|
-
Autobuild.logdir = logdir
|
608
611
|
packages.each do |pkg_name|
|
609
612
|
pkg = Autobuild::Package[pkg_name]
|
610
613
|
pkg.srcdir = File.join(srcdir, pkg_name)
|
@@ -617,7 +620,7 @@ report(debug) do
|
|
617
620
|
if only_do_status
|
618
621
|
STDERR.puts
|
619
622
|
all_packages = Set.new
|
620
|
-
|
623
|
+
manifest.handle_enabled_packages(selected_packages) do |name, _, layout_enabled|
|
621
624
|
all_packages |= layout_enabled
|
622
625
|
end
|
623
626
|
do_status(all_packages)
|
@@ -642,7 +645,7 @@ report(debug) do
|
|
642
645
|
# Otherwise, it is considered as an error
|
643
646
|
#
|
644
647
|
seen = Set.new
|
645
|
-
|
648
|
+
manifest.each_package_set do |name, packages, enabled_packages|
|
646
649
|
packages -= seen
|
647
650
|
|
648
651
|
old_update_flag = Autobuild.do_update
|
@@ -664,7 +667,7 @@ report(debug) do
|
|
664
667
|
all_packages = Set.new
|
665
668
|
all_enabled_packages = Set.new
|
666
669
|
all_sublayouts = Set.new
|
667
|
-
|
670
|
+
manifest.handle_enabled_packages(selected_packages) do |name, packages, enabled_packages, _|
|
668
671
|
packages -= all_enabled_packages
|
669
672
|
enabled_packages -= all_enabled_packages
|
670
673
|
all_sublayouts << name
|
@@ -691,8 +694,8 @@ report(debug) do
|
|
691
694
|
packages_to_import << dep_name
|
692
695
|
end
|
693
696
|
end
|
694
|
-
all_packages.merge(packages)
|
695
697
|
end
|
698
|
+
all_packages.merge(packages)
|
696
699
|
end
|
697
700
|
|
698
701
|
old_update_flag = Autobuild.do_update
|
@@ -707,7 +710,11 @@ report(debug) do
|
|
707
710
|
Autobuild.do_update = old_update_flag
|
708
711
|
end
|
709
712
|
|
710
|
-
missing_packages = all_packages.
|
713
|
+
missing_packages = all_packages.
|
714
|
+
find_all do |pkg_name|
|
715
|
+
!File.directory?(Autobuild::Package[pkg_name].srcdir)
|
716
|
+
end
|
717
|
+
|
711
718
|
if missing_packages.empty?
|
712
719
|
# Backward compatibility: check if name/env.sh exists, and if it is
|
713
720
|
# the case, simply replace it with a link to the root one. And issue
|
@@ -740,6 +747,8 @@ report(debug) do
|
|
740
747
|
end
|
741
748
|
|
742
749
|
Autobuild.apply(all_enabled_packages, "autoproj-build")
|
750
|
+
elsif !no_os_deps
|
751
|
+
manifest.install_os_dependencies(all_enabled_packages)
|
743
752
|
end
|
744
753
|
|
745
754
|
prefixes = all_enabled_packages.inject(Set.new) do |set, pkg_name|
|
data/lib/autoproj/manifest.rb
CHANGED
@@ -955,17 +955,11 @@ module Autoproj
|
|
955
955
|
pkg.name
|
956
956
|
end
|
957
957
|
|
958
|
-
selected_packages = selected_packages.map do |sel|
|
959
|
-
if sel[0] == ?/ # anchored selection
|
960
|
-
/^#{sel}/
|
961
|
-
else
|
962
|
-
Regexp.new(sel)
|
963
|
-
end
|
964
|
-
end
|
965
|
-
|
966
958
|
# First, remove packages that are directly referenced by name or by
|
967
959
|
# package set names
|
968
960
|
selected_packages.delete_if do |sel|
|
961
|
+
sel = Regexp.new(Regexp.quote(sel))
|
962
|
+
|
969
963
|
packages = package_names.find_all { |pkg_name| pkg_name =~ sel }
|
970
964
|
expanded_packages.concat(packages)
|
971
965
|
|
@@ -988,7 +982,7 @@ module Autoproj
|
|
988
982
|
expanded_packages.concat(packages.to_a)
|
989
983
|
else
|
990
984
|
packages = packages.find_all do |pkg_name|
|
991
|
-
(layout_name + pkg_name)
|
985
|
+
sel =~ Regexp.new(Regexp.quote(layout_name + pkg_name))
|
992
986
|
end
|
993
987
|
expanded_packages.concat(packages)
|
994
988
|
!packages.empty?
|
data/lib/autoproj/osdeps.rb
CHANGED
@@ -13,12 +13,14 @@ module Autoproj
|
|
13
13
|
end
|
14
14
|
AUTOPROJ_OSDEPS = File.join(File.expand_path(File.dirname(__FILE__)), 'default.osdeps')
|
15
15
|
def self.load_default
|
16
|
-
OSDependencies.load(AUTOPROJ_OSDEPS)
|
16
|
+
@default_osdeps ||= OSDependencies.load(AUTOPROJ_OSDEPS)
|
17
17
|
end
|
18
18
|
|
19
19
|
attr_reader :definitions
|
20
|
+
attr_reader :gem_fetcher
|
20
21
|
def initialize(defs = Hash.new)
|
21
22
|
@definitions = defs.to_hash
|
23
|
+
@gem_fetcher = Gem::SpecFetcher.fetcher
|
22
24
|
end
|
23
25
|
|
24
26
|
def merge(info)
|
@@ -203,21 +205,22 @@ module Autoproj
|
|
203
205
|
did_something ||= true
|
204
206
|
end
|
205
207
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
208
|
+
if !gems.empty?
|
209
|
+
# Don't install gems that are already there ...
|
210
|
+
gems.delete_if do |name|
|
211
|
+
version_requirements = Gem::Requirement.default
|
212
|
+
installed = Gem.source_index.find_name(name, version_requirements)
|
213
|
+
if !installed.empty? && Autobuild.do_update
|
214
|
+
# Look if we can update the package ...
|
215
|
+
dep = Gem::Dependency.new(name, version_requirements)
|
216
|
+
available = @gem_fetcher.find_matching(dep)
|
217
|
+
installed_version = installed.map(&:version).max
|
218
|
+
available_version = available.map { |(name, v), source| v }.max
|
219
|
+
needs_update = (available_version > installed_version)
|
220
|
+
!needs_update
|
221
|
+
else
|
222
|
+
!installed.empty?
|
223
|
+
end
|
221
224
|
end
|
222
225
|
end
|
223
226
|
|
data/lib/autoproj/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autoproj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvain Joyeux
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-08 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|