From e835036e4176d9197017b0596f5a08f812ab88c8 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Thu, 1 Sep 2011 17:56:36 +0100 Subject: [PATCH] Fix the package name of the original updater not being used when inserting a subtitute updater via the -u command line flag --- tools/create-packages.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tools/create-packages.rb b/tools/create-packages.rb index feac3a0..f7aec5b 100755 --- a/tools/create-packages.rb +++ b/tools/create-packages.rb @@ -119,7 +119,6 @@ class UpdateScriptGenerator # for the updater binary, use the possibly substituted # version in the output directory path = "#{output_dir}/#{@config.updater_binary}" - file.path = strip_prefix(path,"#{output_dir}/") end file.is_main_binary = (file.path == package_config.main_binary) @@ -130,11 +129,10 @@ class UpdateScriptGenerator file.hash = file_sha1(path) file.permissions = get_file_permissions(path) file.size = File.size(path) - package_file_map.each do |package,files| - if files.include?(path) - file.package = package - break - end + file.package = @config.package_for_file(file.path) + + if (!file.package) + raise "Could not find package for file #{file.path}" end end