Skip to content

Commit

Permalink
adapt to changed loaders API
Browse files Browse the repository at this point in the history
  • Loading branch information
doudou committed May 16, 2016
1 parent 4a754bd commit 4698035
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/orocos/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def self.resolve_prefix(model, prefix)
# starting the process and cleaning up when the process
# dies.
class Process < ProcessBase
# The component PkgConfig instance
attr_reader :pkg
# The path to the binary file
attr_reader :binfile
# The component process ID
attr_reader :pid

Expand Down Expand Up @@ -430,7 +430,11 @@ def initialize(name, model = name, loader: Orocos.default_pkgconfig_loader)
loader.deployment_model_from_name(model)
else model
end
@pkg = loader.available_deployments[model.name]
@binfile =
if loader.respond_to?(:find_deployment_binfile)
loader.find_deployment_binfile(model.name)
else loader.available_deployments[model.name].binfile
end
super(name, model)
end

Expand Down Expand Up @@ -951,11 +955,7 @@ def spawn(log_level: nil, working_directory: Orocos.default_working_directory,
ENV['ORBInitRef'] = "NameService=corbaname::#{name_service.ip}"
end

module_bin = pkg.binfile
if !module_bin # assume an older orogen version
module_bin = "#{pkg.exec_prefix}/bin/#{name}"
end
cmdline = [module_bin]
cmdline = [binfile]

# check arguments for log_level
if log_level
Expand Down

0 comments on commit 4698035

Please sign in to comment.