autoproj 1.8.2.rc5 → 1.8.2

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest.txt CHANGED
@@ -2,11 +2,13 @@ History.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ bin/alocate
5
6
  bin/amake
6
7
  bin/aup
7
8
  bin/autolocate
8
9
  bin/autoproj
9
10
  bin/autoproj-clean
11
+ bin/autoproj-create-set
10
12
  bin/autoproj-inspect
11
13
  bin/autoproj-locate
12
14
  bin/autoproj-query
@@ -23,6 +25,8 @@ lib/autoproj/options.rb
23
25
  lib/autoproj/osdeps.rb
24
26
  lib/autoproj/query.rb
25
27
  lib/autoproj/system.rb
28
+ lib/autoproj/templates/create-set/packages.autobuild
29
+ lib/autoproj/templates/create-set/source.yml
26
30
  lib/autoproj/version.rb
27
31
  samples/autoproj/README.txt
28
32
  samples/autoproj/init.rb
@@ -33,7 +37,13 @@ samples/manifest.xml
33
37
  samples/osdeps.yml
34
38
  shell/autoproj_bash
35
39
  shell/autoproj_zsh
40
+ test/data/empty_manifest.xml
41
+ test/data/full_manifest.xml
42
+ test/data/invalid_manifest.xml
36
43
  test/data/test_manifest/autoproj/local/local.autobuild
37
44
  test/data/test_manifest/autoproj/manifest
45
+ test/package_managers/test_gem.rb
38
46
  test/test_debian.rb
39
47
  test/test_manifest.rb
48
+ test/test_os_dependencies.rb
49
+ test/test_package_manifest.rb
data/README.txt CHANGED
@@ -43,7 +43,8 @@ Each package definition includes:
43
43
  * on what the package depends. This can be either another package built by
44
44
  autoproj, or an operating system package.
45
45
 
46
- See this page[http://rock-robotics.org/writing_manifest.html] for more information.
46
+ See this
47
+ page[http://www.rock-robotics.org/stable/documentation/autoproj/writing_manifest.html] for more information.
47
48
 
48
49
 
49
50
  Software packages in Autoproj
@@ -60,5 +61,5 @@ using pkg-config.
60
61
 
61
62
  To describe the package, and more importantly to setup cross-package
62
63
  dependencies, an optional manifest file can be
63
- added[http://rock-robotics.org/package_sets/manifest-xml.html].
64
+ added[http://www.rock-robotics.org/stable/documentation/autoproj/advanced/manifest-xml.html].
64
65
 
data/bin/alocate ADDED
@@ -0,0 +1,2 @@
1
+ #! /usr/bin/env ruby
2
+ load File.expand_path('autoproj-locate', File.dirname(__FILE__))
data/bin/autoproj CHANGED
@@ -99,24 +99,11 @@ EOTEXT
99
99
  end
100
100
  end
101
101
 
102
- needs_update_config = false
103
- selected_packages.delete_if do |name|
104
- if name =~ /^#{Regexp.quote(Autoproj.config_dir + File::SEPARATOR)}/ ||
105
- name =~ /^#{Regexp.quote(Autoproj.remotes_dir + File::SEPARATOR)}/
106
- needs_update_config = true
107
- end
108
- end
109
-
110
102
  Dir.chdir(root_dir)
111
103
 
112
104
  # Basic initialization
113
105
  Autoproj::CmdLine.initialize
114
- if needs_update_config
115
- Autoproj::CmdLine.update_configuration
116
- if selected_packages.empty?
117
- exit 0
118
- end
119
- elsif selected_packages.empty?
106
+ if selected_packages.empty?
120
107
  Autoproj::CmdLine.update_myself
121
108
  Autoproj::CmdLine.update_configuration
122
109
  else
@@ -0,0 +1,86 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ require 'autoproj'
4
+ require 'autoproj/cmdline'
5
+
6
+ pwd = Dir.pwd
7
+ root_dir = Autoproj::CmdLine.initialize_root_directory
8
+ selection = Autoproj::CmdLine.initialize_and_load(ARGV)
9
+
10
+ if !(new_set_path = File.expand_path(selection.shift, pwd))
11
+ Autoproj.message("missing package set name on the command line", :red)
12
+ exit 1
13
+ end
14
+ new_set_name = File.basename(new_set_path)
15
+ selection = Autoproj::CmdLine.resolve_user_selection(selection)
16
+
17
+ # Must re-load the package manifests, as the user selection might have triggered
18
+ # some auto-add
19
+ Autoproj.manifest.packages.each_value do |pkg|
20
+ if File.directory?(pkg.autobuild.srcdir)
21
+ Autoproj.manifest.load_package_manifest(pkg.autobuild.name)
22
+ end
23
+ end
24
+
25
+ # Extract auto-import and new package information
26
+ new_packages, imported_packages = [], []
27
+ selection.each do |pkg_name|
28
+ pkgs = Autoproj.manifest.resolve_package_name(pkg_name)
29
+ pkgs = pkgs.
30
+ map { |type, name| name if type == :package }.
31
+ compact
32
+
33
+ # We look only at direct dependencies. The rest is not our problem (the
34
+ # other package set must take care of importing / loading what's needed)
35
+ deps = Set.new
36
+ pkgs.each do |pkg_name|
37
+ Autobuild::Package[pkg_name].dependencies.each do |dep_name|
38
+ deps << dep_name
39
+ end
40
+ end
41
+ pkgs = pkgs.to_set | deps
42
+ pkgs.each do |pkg_name|
43
+ pkg_def = Autoproj.manifest.package(pkg_name)
44
+
45
+ if pkg_def.package_set.name == "local"
46
+ new_packages << pkg_def
47
+ else
48
+ imported_packages << pkg_def
49
+ end
50
+ end
51
+ end
52
+
53
+ puts
54
+ puts
55
+ new_packages.each do |pkg|
56
+ if !pkg.vcs
57
+ puts " package #{pkg.autobuild.name} has no version control information"
58
+ puts " you will have to provide this in the generated source.yml file"
59
+ end
60
+ end
61
+
62
+ TEMPLATE_DIR = File.expand_path(File.join("..", "lib", "autoproj", "templates"), File.dirname(__FILE__))
63
+ def render_template(*args)
64
+ binding = args.pop
65
+ template = File.read(File.join(TEMPLATE_DIR, *args))
66
+ template = ERB.new(template)
67
+ template.result(binding)
68
+ end
69
+
70
+ if File.exists?(new_set_path)
71
+ Autoproj.error("There is already a directory, file or symlink in #{new_set_path}.")
72
+ Autoproj.error("Delete it or move it before trying again")
73
+ exit 1
74
+ end
75
+
76
+ FileUtils.mkdir_p new_set_path
77
+ autobuild = render_template("create-set", "packages.autobuild", binding)
78
+ File.open(File.join(new_set_path, "packages.autobuild"), "w") do |io|
79
+ io.write autobuild
80
+ end
81
+
82
+ source_yml = render_template("create-set", "source.yml", binding)
83
+ File.open(File.join(new_set_path, "source.yml"), "w") do |io|
84
+ io.write source_yml
85
+ end
86
+
@@ -1395,9 +1395,14 @@ So, what do you want ? (all, ruby, os or none)
1395
1395
  end.compact
1396
1396
  return false if packages.empty?
1397
1397
 
1398
- packages.each do |handler, list|
1399
- handler.install(list)
1400
- @installed_packages |= list.to_set
1398
+ # Install OS packages first, as the other package handlers might
1399
+ # depend on OS packages
1400
+ os_packages, other_packages = packages.partition { |handler, list| handler == os_package_handler }
1401
+ [os_packages, other_packages].each do |packages|
1402
+ packages.each do |handler, list|
1403
+ handler.install(list)
1404
+ @installed_packages |= list.to_set
1405
+ end
1401
1406
  end
1402
1407
  true
1403
1408
  end
@@ -1298,6 +1298,10 @@ where 'mode' is one of:
1298
1298
  vcs_def[:url] = VCSDefinition.to_absolute_url(url)
1299
1299
  options.each do |opt|
1300
1300
  name, value = opt.split("=")
1301
+ if value =~ /^\d+$/
1302
+ value = Integer(value)
1303
+ end
1304
+
1301
1305
  vcs_def[name] = value
1302
1306
  end
1303
1307
 
@@ -1973,12 +1973,14 @@ module Autoproj
1973
1973
  File.file?(path)
1974
1974
  end
1975
1975
 
1976
- if !manifest_path
1977
- Autoproj.warn "#{package.name} from #{package_set.name} does not have a manifest"
1978
- return
1979
- end
1976
+ manifest =
1977
+ if !manifest_path
1978
+ Autoproj.warn "#{package.name} from #{package_set.name} does not have a manifest"
1979
+ PackageManifest.new(package)
1980
+ else
1981
+ PackageManifest.load(package, manifest_path)
1982
+ end
1980
1983
 
1981
- manifest = PackageManifest.load(package, manifest_path)
1982
1984
  pkg.autobuild.description = manifest
1983
1985
  package_manifests[package.name] = manifest
1984
1986
 
@@ -2115,6 +2117,10 @@ module Autoproj
2115
2117
  @selection = Hash.new { |h, k| h[k] = Set.new }
2116
2118
  @matches = Hash.new { |h, k| h[k] = Set.new }
2117
2119
  end
2120
+
2121
+ def each(&block)
2122
+ selection.each_key(&block)
2123
+ end
2118
2124
 
2119
2125
  def select(sel, packages)
2120
2126
  if !packages.respond_to?(:each)
@@ -2345,7 +2351,7 @@ module Autoproj
2345
2351
  "no documentation available for #{package.name} in its manifest.xml file"
2346
2352
  end
2347
2353
 
2348
- def initialize(package, doc)
2354
+ def initialize(package, doc = REXML::Document.new)
2349
2355
  @package = package
2350
2356
  @xml = doc
2351
2357
  end
@@ -1296,9 +1296,14 @@ So, what do you want ? (all, ruby, os or none)
1296
1296
  end.compact
1297
1297
  return false if packages.empty?
1298
1298
 
1299
- packages.each do |handler, list|
1300
- handler.install(list)
1301
- @installed_packages |= list.to_set
1299
+ # Install OS packages first, as the other package handlers might
1300
+ # depend on OS packages
1301
+ os_packages, other_packages = packages.partition { |handler, list| handler == os_package_handler }
1302
+ [os_packages, other_packages].each do |packages|
1303
+ packages.each do |handler, list|
1304
+ handler.install(list)
1305
+ @installed_packages |= list.to_set
1306
+ end
1302
1307
  end
1303
1308
  true
1304
1309
  end
@@ -0,0 +1,10 @@
1
+ # This file tells autoproj which packages are made available by the package set,
2
+ # and also allows to customize the configuration of the packages themselves
3
+ #
4
+ # See http://rock-robotics.org/documentation/autoproj/advanced/autobuild.html
5
+
6
+ <%= new_packages.map do |pkg|
7
+ declname = pkg.autobuild.class.name.gsub(/.*::/, '').downcase
8
+ "#{declname}_package \"#{pkg.autobuild.name}\""
9
+ end.join("\n") %>
10
+
@@ -0,0 +1,51 @@
1
+ # This file gives information about the package (mainly its name) and
2
+ # information about where to get the packages
3
+ #
4
+ # See http://rock-robotics.org/documentation/autoproj/advanced/creating_pkg_set.html
5
+ name: <%= new_set_name %>
6
+ <% def render_vcs(vcs)
7
+ pkg_import = []
8
+ pkg_import << "type: #{vcs.type}"
9
+ pkg_import << "url: #{vcs.url}"
10
+ vcs.options.each do |k, v|
11
+ if v.kind_of?(String)
12
+ pkg_import << "#{k}: \"#{v}\""
13
+ else
14
+ pkg_import << "#{k}: #{v}"
15
+ end
16
+ end
17
+ pkg_import
18
+ end
19
+
20
+ imports = imported_packages.map do |pkg|
21
+ pkg_import = render_vcs(pkg.package_set.vcs)
22
+ " # #{pkg.package_set.name}\n - #{pkg_import.join("\n ")}"
23
+ end %>
24
+ <% new_vcs = new_packages.map do |pkg|
25
+ pkg_import = []
26
+ if pkg.vcs
27
+ pkg_import = render_vcs(pkg.vcs)
28
+ else
29
+ pkg_import = ["type: git",
30
+ "url: git://gitorious.org/dummy_project/dummy_package.git",
31
+ "push_to: git@gitorious.org:dummy_project/dummy_package.git"]
32
+ end
33
+ " - #{pkg.autobuild.name}\n #{pkg_import.join("\n ")}"
34
+ end %>
35
+ # This section allows to make autoproj load some other package sets
36
+ # automatically
37
+ #
38
+ # Example:
39
+ # - type: git
40
+ # url: git://gitorious.org/rock/package_set.git
41
+ #
42
+ # See http://rock-robotics.org/documentation/autoproj/advanced/cross_set_dependencies.html
43
+ imports:
44
+ <%= imports.join("\n") %>
45
+
46
+
47
+ # This section declares where the packages can be loaded from
48
+ #
49
+ # See http://rock-robotics.org/documentation/autoproj/advanced/importers.html
50
+ version_control:
51
+ <%= new_vcs.join("\n") %>
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.8.2.rc5"
2
+ VERSION = "1.8.2"
3
3
  end
@@ -0,0 +1,2 @@
1
+ <project>
2
+ </project>
@@ -0,0 +1,19 @@
1
+ <package>
2
+ <description brief="short_doc">
3
+ full_doc
4
+ </description>
5
+ <author>Author1/author1@email,Author2/author2@email</author>
6
+ <author>Author3</author>
7
+
8
+ <license>BSD</license>
9
+ <url>the_url</url>
10
+ <logo>the_logo</logo>
11
+ <depend package="dep1"/>
12
+ <depend package="dep2"/>
13
+ <depend package="opt_dep1" optional="1"/>
14
+ <depend_optional package="opt_dep2"/>
15
+ <rosdep name="osdep1"/>
16
+
17
+ <tags>tag1,tag2</tags>
18
+ <tags>tag3</tags>
19
+ </package>
@@ -0,0 +1,3 @@
1
+ <package>
2
+ <bla
3
+ </package>
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2.rc5
5
- prerelease: 6
4
+ version: 1.8.2
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Rock Core Developers
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-19 00:00:00.000000000 Z
12
+ date: 2012-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: autobuild
16
- requirement: &6585400 !ruby/object:Gem::Requirement
16
+ requirement: &20293000 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.6.0.rc1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *6585400
24
+ version_requirements: *20293000
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: utilrb
27
- requirement: &6584240 !ruby/object:Gem::Requirement
27
+ requirement: &20292240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.6.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *6584240
35
+ version_requirements: *20292240
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: highline
38
- requirement: &6582160 !ruby/object:Gem::Requirement
38
+ requirement: &20291220 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.5.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *6582160
46
+ version_requirements: *20291220
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rdoc
49
- requirement: &6580580 !ruby/object:Gem::Requirement
49
+ requirement: &20289640 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '3.10'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *6580580
57
+ version_requirements: *20289640
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: hoe
60
- requirement: &6578900 !ruby/object:Gem::Requirement
60
+ requirement: &20288800 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,17 +65,19 @@ dependencies:
65
65
  version: '3.1'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *6578900
68
+ version_requirements: *20288800
69
69
  description: autoproj is a manager for sets of software packages. It allows the user
70
70
  to import and build packages from source, still using the underlying distribution's
71
71
  native package manager for software that is available on it.
72
72
  email: rock-dev@dfki.de
73
73
  executables:
74
+ - alocate
74
75
  - amake
75
76
  - aup
76
77
  - autolocate
77
78
  - autoproj
78
79
  - autoproj-clean
80
+ - autoproj-create-set
79
81
  - autoproj-inspect
80
82
  - autoproj-locate
81
83
  - autoproj-query
@@ -92,11 +94,13 @@ files:
92
94
  - Manifest.txt
93
95
  - README.txt
94
96
  - Rakefile
97
+ - bin/alocate
95
98
  - bin/amake
96
99
  - bin/aup
97
100
  - bin/autolocate
98
101
  - bin/autoproj
99
102
  - bin/autoproj-clean
103
+ - bin/autoproj-create-set
100
104
  - bin/autoproj-inspect
101
105
  - bin/autoproj-locate
102
106
  - bin/autoproj-query
@@ -113,6 +117,8 @@ files:
113
117
  - lib/autoproj/osdeps.rb
114
118
  - lib/autoproj/query.rb
115
119
  - lib/autoproj/system.rb
120
+ - lib/autoproj/templates/create-set/packages.autobuild
121
+ - lib/autoproj/templates/create-set/source.yml
116
122
  - lib/autoproj/version.rb
117
123
  - samples/autoproj/README.txt
118
124
  - samples/autoproj/init.rb
@@ -123,13 +129,16 @@ files:
123
129
  - samples/osdeps.yml
124
130
  - shell/autoproj_bash
125
131
  - shell/autoproj_zsh
132
+ - test/data/empty_manifest.xml
133
+ - test/data/full_manifest.xml
134
+ - test/data/invalid_manifest.xml
126
135
  - test/data/test_manifest/autoproj/local/local.autobuild
127
136
  - test/data/test_manifest/autoproj/manifest
137
+ - test/package_managers/test_gem.rb
128
138
  - test/test_debian.rb
129
139
  - test/test_manifest.rb
130
- - test/test_package_manifest.rb
131
140
  - test/test_os_dependencies.rb
132
- - test/package_managers/test_gem.rb
141
+ - test/test_package_manifest.rb
133
142
  - .gemtest
134
143
  homepage: http://rock-robotics.org/documentation/autoproj
135
144
  licenses: []
@@ -148,9 +157,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
157
  required_rubygems_version: !ruby/object:Gem::Requirement
149
158
  none: false
150
159
  requirements:
151
- - - ! '>'
160
+ - - ! '>='
152
161
  - !ruby/object:Gem::Version
153
- version: 1.3.1
162
+ version: '0'
154
163
  requirements: []
155
164
  rubyforge_project: autobuild
156
165
  rubygems_version: 1.8.11