Fix the package name of the original updater not being used when inserting a subtitute updater via the -u command line flag

This commit is contained in:
Robert Knight 2011-09-01 17:56:36 +01:00
parent 6c9c8696fb
commit e835036e41

View file

@ -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