Merge branch 'master' of salsa.debian.org:debian/debshots

This commit is contained in:
Christoph Haas 2020-04-20 20:29:06 +02:00
commit 33086f9430
12 changed files with 132 additions and 52 deletions

View file

@ -105,7 +105,7 @@ namespace :debshots do
new_version = DebImporter::Version.new(package[:Version])
Rails.logger.debug "Comparing package version: old=#{db_package.version} new=#{new_version}"
if new_version > current_version
if new_version.upstream > current_version.upstream
# update the package information from new data
update_data(package, db_package)
Rails.logger.info "Updating package information"
@ -241,7 +241,7 @@ def update_data(package, db_package)
Rails.logger.debug "New information: #{package.inspect}"
# Rails.logger.info "New package version found. Updating details in database."
db_package.version = package[:Version]
db_package.version = Version.new(package[:Version]).upstream
db_package.name = package[:Package] unless db_package.name # set the name for new packages
db_package.description = package[:Description][0..79]
db_package.homepage = package[:Homepage]