autoproj 1.9.7.rc3 → 1.9.7.rc4

Sign up to get free protection for your applications and to get access to all the features.
@@ -235,14 +235,16 @@ fi
235
235
  needs_locking, user_install_cmd, auto_install_cmd
236
236
  end
237
237
 
238
- def generate_user_os_script(os_packages)
238
+ def generate_user_os_script(os_packages, options = Hash.new)
239
+ user_install_cmd = options[:user_install_cmd] || self.user_install_cmd
239
240
  if user_install_cmd
240
241
  (user_install_cmd % [os_packages.join("' '")])
241
242
  else generate_auto_os_script(os_packages)
242
243
  end
243
244
  end
244
245
 
245
- def generate_auto_os_script(os_packages)
246
+ def generate_auto_os_script(os_packages, options = Hash.new)
247
+ auto_install_cmd = options[:auto_install_cmd] || self.auto_install_cmd
246
248
  (auto_install_cmd % [os_packages.join("' '")])
247
249
  end
248
250
 
@@ -280,11 +282,11 @@ fi
280
282
  false
281
283
  end
282
284
 
283
- def install(packages)
285
+ def install(packages, options = Hash.new)
284
286
  handled_os = OSDependencies.supported_operating_system?
285
287
  if handled_os
286
- shell_script = generate_auto_os_script(packages)
287
- user_shell_script = generate_user_os_script(packages)
288
+ shell_script = generate_auto_os_script(packages, options)
289
+ user_shell_script = generate_user_os_script(packages, options)
288
290
  end
289
291
  if osdeps_interaction(packages, user_shell_script)
290
292
  Autoproj.message " installing OS packages: #{packages.sort.join(", ")}"
@@ -334,9 +336,28 @@ fi
334
336
  class ZypperManager < ShellScriptManager
335
337
  def initialize
336
338
  super(['zypper'], true,
337
- "zypper -n install '%s'",
339
+ "zypper install '%s'",
338
340
  "zypper -n install '%s'")
339
341
  end
342
+
343
+ def install(packages)
344
+ patterns, packages = packages.partition { |pkg| pkg =~ /^@/ }
345
+ patterns = patterns.map { |str| str[1..-1] }
346
+ result = false
347
+ if !patterns.empty?
348
+ result |= super(patterns,
349
+ :auto_install_cmd => "zypper --non-interactive install --type pattern '%s'",
350
+ :user_install_cmd => "zypper install --type pattern '%s'")
351
+ end
352
+ if !packages.empty?
353
+ result |= super(packages)
354
+ end
355
+ if result
356
+ # Invalidate caching of installed packages, as we just
357
+ # installed new packages !
358
+ @installed_packages = nil
359
+ end
360
+ end
340
361
  end
341
362
 
342
363
  # Package manager interface for systems that use yum
@@ -523,7 +544,7 @@ fi
523
544
  def install(gems)
524
545
  guess_gem_program
525
546
 
526
- base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install']
547
+ base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install', '--no-format-executable']
527
548
  if !GemManager.with_doc
528
549
  base_cmdline << '--no-rdoc' << '--no-ri'
529
550
  end
@@ -2286,6 +2307,7 @@ ruby20:
2286
2307
  - ruby2.0-dev
2287
2308
  - rake
2288
2309
  - rubygems-integration
2310
+ opensuse: ruby20-devel
2289
2311
  default: ignore
2290
2312
  ruby21:
2291
2313
  debian:
@@ -2300,7 +2322,9 @@ build-essential:
2300
2322
  arch,manjarolinux: base-dev
2301
2323
  fedora: ignore
2302
2324
  darwin: ignore
2303
- opensuse: ignore
2325
+ opensuse:
2326
+ - ! '@devel_C_C++'
2327
+ - gcc-c++
2304
2328
  autobuild: gem
2305
2329
  autoproj: gem
2306
2330
  git:
@@ -2438,7 +2462,7 @@ end
2438
2462
  File.open('env.sh', 'w') do |io|
2439
2463
  io.write <<-EOSHELL
2440
2464
  export RUBYOPT=-rubygems
2441
- export GEM_PATH=#{gem_path.join(":")}
2465
+ export GEM_PATH=#{gem_path}
2442
2466
  export GEM_HOME=#{gem_home}
2443
2467
  export PATH=$GEM_HOME/bin:$PATH
2444
2468
  EOSHELL
@@ -177,7 +177,7 @@ end
177
177
  File.open('env.sh', 'w') do |io|
178
178
  io.write <<-EOSHELL
179
179
  export RUBYOPT=-rubygems
180
- export GEM_PATH=#{gem_path.join(":")}
180
+ export GEM_PATH=#{gem_path}
181
181
  export GEM_HOME=#{gem_home}
182
182
  export PATH=$GEM_HOME/bin:$PATH
183
183
  EOSHELL
@@ -57,6 +57,7 @@ ruby20:
57
57
  - ruby2.0-dev
58
58
  - rake
59
59
  - rubygems-integration
60
+ opensuse: ruby20-devel
60
61
  default: ignore
61
62
 
62
63
  ruby21:
@@ -73,7 +74,7 @@ build-essential:
73
74
  arch,manjarolinux: base-dev
74
75
  fedora: ignore
75
76
  darwin: ignore
76
- opensuse: ignore #Toto add scemata
77
+ opensuse: ["@devel_C_C++", "gcc-c++"]
77
78
 
78
79
  autobuild: gem
79
80
  autoproj: gem
@@ -119,14 +119,16 @@ fi
119
119
  needs_locking, user_install_cmd, auto_install_cmd
120
120
  end
121
121
 
122
- def generate_user_os_script(os_packages)
122
+ def generate_user_os_script(os_packages, options = Hash.new)
123
+ user_install_cmd = options[:user_install_cmd] || self.user_install_cmd
123
124
  if user_install_cmd
124
125
  (user_install_cmd % [os_packages.join("' '")])
125
126
  else generate_auto_os_script(os_packages)
126
127
  end
127
128
  end
128
129
 
129
- def generate_auto_os_script(os_packages)
130
+ def generate_auto_os_script(os_packages, options = Hash.new)
131
+ auto_install_cmd = options[:auto_install_cmd] || self.auto_install_cmd
130
132
  (auto_install_cmd % [os_packages.join("' '")])
131
133
  end
132
134
 
@@ -164,11 +166,11 @@ fi
164
166
  false
165
167
  end
166
168
 
167
- def install(packages)
169
+ def install(packages, options = Hash.new)
168
170
  handled_os = OSDependencies.supported_operating_system?
169
171
  if handled_os
170
- shell_script = generate_auto_os_script(packages)
171
- user_shell_script = generate_user_os_script(packages)
172
+ shell_script = generate_auto_os_script(packages, options)
173
+ user_shell_script = generate_user_os_script(packages, options)
172
174
  end
173
175
  if osdeps_interaction(packages, user_shell_script)
174
176
  Autoproj.message " installing OS packages: #{packages.sort.join(", ")}"
@@ -218,9 +220,28 @@ fi
218
220
  class ZypperManager < ShellScriptManager
219
221
  def initialize
220
222
  super(['zypper'], true,
221
- "zypper -n install '%s'",
223
+ "zypper install '%s'",
222
224
  "zypper -n install '%s'")
223
225
  end
226
+
227
+ def install(packages)
228
+ patterns, packages = packages.partition { |pkg| pkg =~ /^@/ }
229
+ patterns = patterns.map { |str| str[1..-1] }
230
+ result = false
231
+ if !patterns.empty?
232
+ result |= super(patterns,
233
+ :auto_install_cmd => "zypper --non-interactive install --type pattern '%s'",
234
+ :user_install_cmd => "zypper install --type pattern '%s'")
235
+ end
236
+ if !packages.empty?
237
+ result |= super(packages)
238
+ end
239
+ if result
240
+ # Invalidate caching of installed packages, as we just
241
+ # installed new packages !
242
+ @installed_packages = nil
243
+ end
244
+ end
224
245
  end
225
246
 
226
247
  # Package manager interface for systems that use yum
@@ -407,7 +428,7 @@ fi
407
428
  def install(gems)
408
429
  guess_gem_program
409
430
 
410
- base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install']
431
+ base_cmdline = [Autobuild.tool_in_path('ruby'), '-S', Autobuild.tool('gem'), 'install', '--no-format-executable']
411
432
  if !GemManager.with_doc
412
433
  base_cmdline << '--no-rdoc' << '--no-ri'
413
434
  end
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.7.rc3"
2
+ VERSION = "1.9.7.rc4"
3
3
  end
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.9.7.rc3
4
+ version: 1.9.7.rc4
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: