diff --git a/lib/deb_importer.rb b/lib/deb_importer.rb index 7d60196..0d36d33 100644 --- a/lib/deb_importer.rb +++ b/lib/deb_importer.rb @@ -17,7 +17,7 @@ module DebImporter attr_reader :architectures, :components, :description, :codename, :origin, :version, :files # Load and parse a Release file of an APT repository - def initialize(dist_url, components) + def initialize(dist_url) @dist_url = dist_url release_url = dist_url + "/Release" Rails.logger.debug "Loading Release file from #{release_url}" @@ -29,18 +29,12 @@ module DebImporter @codename = fields[:Codename] @origin = fields[:Origin] @version = fields[:Version] - # Not needed at the moment. We do not check sizes or checksums yet. - #when 'SHA1', 'SHA256', 'MD5Sum' - # next if @files # skip parsing files if another section (e.g. "MD5Sum") already gathered them - # @files = [] - # value.lines.each do |line| - # path = line.split.last - # @files << path - # end + + # TODO: check sizes and checksums end # open end # def initialize - # TODO: Avoid code duplication (bz2, gz, ...) + # Get package information from translation (i18n) files def i18n(component, language) url = "#{@dist_url}/#{component}/i18n/Translation-en" file = find_and_open_compressed_url(url) @@ -92,7 +86,7 @@ module DebImporter private - # Gather the fields of a Debian control file and return them as a hash + # Gather the fields of a Debian control file section and return them as a hash def get_fields(data) fields = {}