autoproj 1.7.7 → 1.7.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ = Version 1.7.8
2
+ * fix bootstrap and switch-config with VCS options (i.e. setting a branch on
3
+ the git importer)
4
+ * amake now accepts options, i.e.
5
+ amake . --no-deps will only build the current package (without looking at
6
+ dependencies)
7
+ * added aup, which is a shortcut for autoproj update
8
+ as for amake, aup without arguments will update the package in which it is
9
+ started
10
+
1
11
  = Version 1.7.7
2
12
  * quickfix a trivial bug
3
13
 
data/Manifest.txt CHANGED
@@ -2,6 +2,8 @@ History.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ bin/amake
6
+ bin/aup
5
7
  bin/autolocate
6
8
  bin/autoproj
7
9
  bin/autoproj_bootstrap
@@ -11,9 +13,9 @@ lib/autoproj/autobuild.rb
11
13
  lib/autoproj/base.rb
12
14
  lib/autoproj/cmdline.rb
13
15
  lib/autoproj/default.osdeps
16
+ lib/autoproj/gitorious.rb
14
17
  lib/autoproj/manifest.rb
15
18
  lib/autoproj/options.rb
16
- lib/autoproj/gitorious.rb
17
19
  lib/autoproj/osdeps.rb
18
20
  lib/autoproj/system.rb
19
21
  lib/autoproj/version.rb
data/bin/amake ADDED
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ if ARGV.grep(/^-/).size == ARGV.size
4
+ ARGV.push '.'
5
+ end
6
+ ARGV.unshift "build"
7
+ load File.expand_path('autoproj', File.dirname(__FILE__))
8
+
data/bin/aup ADDED
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env ruby
2
+
3
+ if ARGV.grep(/^-/).size == ARGV.size
4
+ ARGV.push '.'
5
+ end
6
+ ARGV.unshift "update"
7
+ load File.expand_path('autoproj', File.dirname(__FILE__))
8
+
@@ -24,6 +24,11 @@ module Autoproj
24
24
  console.color(*args)
25
25
  end
26
26
 
27
+ # Displays an error message
28
+ def self.error(message)
29
+ Autoproj.progress(" ERROR: #{message}", :red, :bold)
30
+ end
31
+
27
32
  # Displays a warning message
28
33
  def self.warn(message)
29
34
  Autoproj.progress(" WARN: #{message}", :magenta)
@@ -967,8 +972,15 @@ where 'mode' is one of:
967
972
  # configuration switch code. This is acceptable as long as we
968
973
  # quit just after the switch
969
974
  Dir.chdir(Autoproj.root_dir)
970
- switch_config(*remaining_args)
971
- exit 0
975
+ if switch_config(*remaining_args)
976
+ Autobuild.do_update = true
977
+ Autobuild.do_build = false
978
+ @update_os_dependencies = false
979
+ @only_config = true
980
+ remaining_args.clear
981
+ else
982
+ exit 0
983
+ end
972
984
 
973
985
  when "reconfigure"
974
986
  Autoproj.reconfigure = true
@@ -1174,6 +1186,16 @@ where 'mode' is one of:
1174
1186
  if vcs && (vcs.type == type && vcs.url == url)
1175
1187
  # Don't need to do much: simply change the options and save the config
1176
1188
  # file, the VCS handler will take care of the actual switching
1189
+ vcs_def = Autoproj.user_config('manifest_source')
1190
+ options.each do |opt|
1191
+ opt_name, opt_value = opt.split('=')
1192
+ vcs_def[opt_name] = opt_value
1193
+ end
1194
+ Autoproj.normalize_vcs_definition(vcs_def)
1195
+ Autoproj.change_option "manifest_source", vcs_def.dup, true
1196
+ Autoproj.save_config
1197
+ true
1198
+
1177
1199
  else
1178
1200
  # We will have to delete the current autoproj directory. Ask the user.
1179
1201
  opt = Autoproj::BuildOption.new("delete current config", "boolean",
@@ -1185,6 +1207,7 @@ where 'mode' is one of:
1185
1207
  Dir.chdir(Autoproj.root_dir) do
1186
1208
  do_switch_config(true, type, url, *options)
1187
1209
  end
1210
+ false
1188
1211
  end
1189
1212
  end
1190
1213
 
@@ -1192,8 +1215,8 @@ where 'mode' is one of:
1192
1215
  vcs_def = Hash.new
1193
1216
  vcs_def[:type] = type
1194
1217
  vcs_def[:url] = VCSDefinition.to_absolute_url(url)
1195
- while !options.empty?
1196
- name, value = options.shift.split("=")
1218
+ options.each do |opt|
1219
+ name, value = opt.split("=")
1197
1220
  vcs_def[name] = value
1198
1221
  end
1199
1222
 
@@ -1240,8 +1263,10 @@ where 'mode' is one of:
1240
1263
  Autoproj.change_option "manifest_source", vcs_def.dup, true
1241
1264
  Autoproj.save_config
1242
1265
 
1243
- rescue Exception
1266
+ rescue Exception => e
1267
+ Autoproj.error "switching configuration failed: #{e.message}"
1244
1268
  if backup_name
1269
+ Autoproj.error "restoring old configuration"
1245
1270
  FileUtils.rm_rf config_dir if config_dir
1246
1271
  FileUtils.mv backup_name, config_dir
1247
1272
  end
@@ -52,7 +52,7 @@ module Autoproj
52
52
  # use http when git fails
53
53
  if Autobuild::Importer.respond_to?(:fallback) && options[:fallback_to_http]
54
54
  Autobuild::Importer.fallback do |package, importer|
55
- root_rx = /^(?:http:\/\/git\.|git:\/\/|git@)#{Regexp.quote(base_url)}/
55
+ root_rx = /^(?:http:\/\/git\.|git:\/\/|git@)#{Regexp.quote(base_url)}:?/
56
56
  if importer.kind_of?(Autobuild::Git) && importer.repository =~ root_rx && importer.repository !~ /^http/
57
57
  Autoproj.warn "import from #{importer.repository} failed, falling back to using http for all packages on #{base_url}"
58
58
  Autobuild::Package.each do |pkg_name, pkg|
@@ -1693,13 +1693,12 @@ module Autoproj
1693
1693
 
1694
1694
  def each_package_dependency
1695
1695
  if block_given?
1696
- xml.xpath('//depend').each do |node|
1696
+ depend_nodes = xml.xpath('//depend').to_a +
1697
+ xml.xpath('//depend_optional').to_a
1698
+
1699
+ depend_nodes.each do |node|
1697
1700
  dependency = node['package']
1698
- optional =
1699
- if node['optional'].to_s == '1'
1700
- true
1701
- else false
1702
- end
1701
+ optional = (node['optional'].to_s == '1' || node.name == "depend_optional")
1703
1702
 
1704
1703
  if dependency
1705
1704
  yield(dependency, optional)
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.7.7"
2
+ VERSION = "1.7.8"
3
3
  end
data/shell/autoproj_bash CHANGED
@@ -9,11 +9,3 @@ function acd {
9
9
  return 0
10
10
  fi
11
11
  }
12
-
13
- function amake {
14
- if test -z "$@"; then
15
- autoproj fast-build .
16
- else
17
- autoproj fast-build "$@"
18
- fi
19
- }
data/shell/autoproj_zsh CHANGED
@@ -9,12 +9,3 @@ function acd {
9
9
  return 0
10
10
  fi
11
11
  }
12
-
13
- function amake {
14
- if test -z "$@"; then
15
- autoproj fast-build .
16
- else
17
- autoproj fast-build "$@"
18
- fi
19
- }
20
-
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 7
10
- version: 1.7.7
9
+ - 8
10
+ version: 1.7.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sylvain Joyeux
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-07 00:00:00 +01:00
18
+ date: 2011-03-04 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -174,6 +174,8 @@ description: |-
174
174
  email:
175
175
  - sylvain.joyeux@dfki.de
176
176
  executables:
177
+ - amake
178
+ - aup
177
179
  - autolocate
178
180
  - autoproj
179
181
  - autoproj_bootstrap
@@ -190,6 +192,8 @@ files:
190
192
  - Manifest.txt
191
193
  - README.txt
192
194
  - Rakefile
195
+ - bin/amake
196
+ - bin/aup
193
197
  - bin/autolocate
194
198
  - bin/autoproj
195
199
  - bin/autoproj_bootstrap
@@ -199,9 +203,9 @@ files:
199
203
  - lib/autoproj/base.rb
200
204
  - lib/autoproj/cmdline.rb
201
205
  - lib/autoproj/default.osdeps
206
+ - lib/autoproj/gitorious.rb
202
207
  - lib/autoproj/manifest.rb
203
208
  - lib/autoproj/options.rb
204
- - lib/autoproj/gitorious.rb
205
209
  - lib/autoproj/osdeps.rb
206
210
  - lib/autoproj/system.rb
207
211
  - lib/autoproj/version.rb