Refactored Task#build_package_list to fix 'overdownloading' packages that then are replaced/no longer needed; FIXME: broke Repair task in the process.

This commit is contained in:
2024-03-02 01:41:36 -06:00
parent 84051103fc
commit cd0db4e0fc
3 changed files with 31 additions and 21 deletions

View File

@@ -30,7 +30,7 @@ class W3DHub
def parse_files
@document.root.elements.each("//File") do |element|
@files.push(ManifestFile.new(element))
@files.push(ManifestFile.new(element, @version))
end
end
@@ -42,9 +42,9 @@ class W3DHub
# TODO: Support patches
class ManifestFile
attr_reader :name, :checksum, :package, :removed_since, :from
attr_reader :name, :checksum, :package, :removed_since, :from, :version
def initialize(xml)
def initialize(xml, version)
@data = xml
@name = @data["name"]
@@ -58,6 +58,8 @@ class W3DHub
@from = patch["from"]
@package = patch["package"]
end
@version = version
end
def removed?