autoproj 1.13.5 → 1.13.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f64596563a0e120b680f113398de4b459b0d1b61
4
- data.tar.gz: 34e5fb1b97d0a40e333a18dbf180cca211dc4f5f
3
+ metadata.gz: 91f2f8f2ee8e760db9598f7b8d12c6d47c5efebb
4
+ data.tar.gz: c3f5a5a811b784361f2b01e856162b777d821b3c
5
5
  SHA512:
6
- metadata.gz: 210404bc22acc099d6d9898987a437f9c621899e049a584b1784ec52e6efe82022083a3f02a7351a6cf216f39738b9e5677cc8f7451319cc34db96e5123747bd
7
- data.tar.gz: 820b985f771c8d8b68ede2fac87ef0a84544f6c2a8e913e4f4d5324030e1746a834350af3bf66aa8ff673e3d8d5b7832d805e02fc692d28d7f30b8074a062ea3
6
+ metadata.gz: 553c69b190843df01046b667ccbeff230492cbfe879442042400a226d84c92768ddc0333a14edf06168f347fc4d25593157c8a22c1895d6a1619cfaa3150db65
7
+ data.tar.gz: b88ca4d0120dee5659b54b4c8ae259b3a063c1570bc66f5265669de0f593d5b68fa35a77cff67cf89914842bb705604d7aab3ed71e6c6b86b3e3448d3c0b817e
@@ -2542,19 +2542,17 @@ module Autobuild
2542
2542
  programs[name.to_sym] || programs[name.to_s] || name.to_s
2543
2543
  end
2544
2544
 
2545
- def find_in_path(file)
2546
- path = ENV['PATH'].split(File::PATH_SEPARATOR).
2547
- find { |dir| File.exist?(File.join(dir, file)) }
2548
- if path
2549
- return File.join(path, file)
2550
- end
2545
+ # Find a file in a given path-like variable
2546
+ def find_in_path(file, envvar = 'PATH')
2547
+ env.find_in_path(file, envvar)
2551
2548
  end
2552
2549
 
2553
2550
  # Resolves the absolute path to a given tool
2554
- def tool_in_path(name)
2551
+ def tool_in_path(name, env: self.env)
2555
2552
  path, path_name, path_env = programs_in_path[name]
2556
2553
  current = tool(name)
2557
- if path_env != ENV['PATH'] || path_name != current
2554
+ env_PATH = env.resolved_env['PATH']
2555
+ if (path_env != env_PATH) || (path_name != current)
2558
2556
  # Delete the current entry given that it is invalid
2559
2557
  programs_in_path.delete(name)
2560
2558
  if current[0, 1] == "/"
@@ -2574,7 +2572,7 @@ module Autobuild
2574
2572
  elsif !File.executable?(path)
2575
2573
  raise ArgumentError, "tool #{name} is set to #{current}, but this resolves to #{path} which is not executable"
2576
2574
  end
2577
- programs_in_path[name] = [path, current, ENV['PATH']]
2575
+ programs_in_path[name] = [path, current, env_PATH]
2578
2576
  end
2579
2577
 
2580
2578
  return path
@@ -403,6 +403,10 @@ module Autoproj
403
403
  end
404
404
  end
405
405
 
406
+ def find_package_definition(name)
407
+ packages[name]
408
+ end
409
+
406
410
  def find_package(name)
407
411
  packages[name]
408
412
  end
@@ -38,6 +38,14 @@ module Autoproj
38
38
  @packages.each(&block)
39
39
  end
40
40
 
41
+ # Filter this metapackage by removing some packages
42
+ def remove(pkg)
43
+ if !pkg.respond_to?(:to_str)
44
+ pkg = pkg.name
45
+ end
46
+ @packages.delete_if { |p| p.name == pkg }
47
+ end
48
+
41
49
  # Tests if the given package is included in this metapackage
42
50
  #
43
51
  # @param [String,#name] pkg the package or package name
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.13.5"
2
+ VERSION = "1.13.6"
3
3
  end
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: 1.13.5
4
+ version: 1.13.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rock Core Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-09 00:00:00.000000000 Z
11
+ date: 2016-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild