def update_config
      if File.exist?(config_file)
        Pkgr.debug "Loading #{distribution.slug} from #{config_file}."
        @config = Config.load_file(config_file, distribution.slug).merge(config)
        Pkgr.debug "Found .pkgr.yml file. Updated config is now: #{config.inspect}"

        # update distribution config
        distribution.config = @config

        # FIXME: make Config the authoritative source of the runner config (distribution only tells the default runner)
        if @config.runner
          type, *version = @config.runner.split("-")
          distribution.runner = Distributions::Runner.new(type, version.join("-"))
        end
      end
      config.distribution = distribution
      config.env.variables.push("TARGET=#{distribution.target}")
      # useful for templates that need to read files
      config.source_dir = source_dir
      config.build_dir = build_dir
    end
def update_config
      if File.exist?(config_file)
        Pkgr.debug "Loading #{distribution.slug} from #{config_file}."
        @config = Config.load_file(config_file, distribution.slug).merge(config)
        Pkgr.debug "Found .pkgr.yml file. Updated config is now: #{config.inspect}"

        # update distribution config
        distribution.config = @config

        # FIXME: make Config the authoritative source of the runner config (distribution only tells the default runner)
        if @config.runner
          type, *version = @config.runner.split("-")
          distribution.runner = Distributions::Runner.new(type, version.join("-"))
        end
      end
      config.distribution = distribution
      config.env.variables.push("TARGET=#{distribution.target}")
      # useful for templates that need to read files
      config.source_dir = source_dir
      config.build_dir = build_dir
    end
Update existing config with the one from .pkgr.yml file, if any