Permalink
Browse files

port 007f486 to the current Ness version:

move the prop_builder instantiation out of the c'tor, it is used only once
and it needs to take a possible config_uri in account. This squashes the
long standing bug that "-z" does not work on a totally empty and never used
slot.
  • Loading branch information...
1 parent 9dcd400 commit fe67b0201264d41e25c45704ff1b02976cfa5bce @hgschmie committed May 26, 2012
Showing with 2 additions and 2 deletions.
  1. +0 −1 lib/galaxy/agent.rb
  2. +2 −1 lib/galaxy/agent_remote_api.rb
View
1 lib/galaxy/agent.rb
@@ -59,7 +59,6 @@ def initialize agent_id, agent_group, url, machine, announcements_url, repositor
FileUtils.mkdir_p(data_dir) unless File.exists? data_dir
@announce_interval = announce_interval
- @prop_builder = Galaxy::Properties::Builder.new repository_base, @http_user, @http_password, @logger
@repository = Galaxy::Repository.new repository_base, @logger
@db = Galaxy::DB.new data_dir
@slot_info = Galaxy::SlotInfo.new @db, repository_base, binaries_base, @logger, @machine, @agent_id, @agent_group, @slot_environment
View
3 lib/galaxy/agent_remote_api.rb
@@ -20,7 +20,8 @@ def become! req_build_version, requested_config_path, config_uri=nil, binaries_u
build_version = Galaxy::BuildVersion.new_from_options req_build_version
if build_version.nil?
- build_version = Galaxy::BuildProperties.new_from_config(@logger, @prop_builder, requested_config)
+ prop_builder = Galaxy::Properties::Builder.new config_uri.nil? ? @repository_base : config_uri, @http_user, @http_password, @logger
+ build_version = Galaxy::BuildProperties.new_from_config(@logger, prop_builder, requested_config)
build_version.validate_os(@os)
end

0 comments on commit fe67b02

Please sign in to comment.