From a4cba97e11f9d57ebaac4d6ab4ccbff930df4b97 Mon Sep 17 00:00:00 2001 From: Donald Curtis Date: Sat, 25 Jan 2014 23:06:28 -0800 Subject: [PATCH] fix update.rss timestamp generation makes sure that if we have a version that is not a timestamp, then we can still build the rss feed. this is a terrible hack and probably needs fixing. --- html/updates.rss.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/html/updates.rss.erb b/html/updates.rss.erb index ecfad384..9d7e5928 100644 --- a/html/updates.rss.erb +++ b/html/updates.rss.erb @@ -22,8 +22,12 @@ package.name = pkgname package.version = version package.description = descr.gsub(/ \[source:.*$/, '') + begin hour_portion = versions[1] ? sprintf("%04d", versions[1]) : "0000" package.build_time = Time.new(version[0..3].to_i, version[4..5].to_i, version[6..7].to_i, hour_portion[0..1].to_i, hour_portion[2..3].to_i) + rescue ArgumentError + package.build_time = Time.now() + end package.url = "#{base_url}packages/#{pkgname}-#{version}." + (pkgtype == "single" ? "el" : "tar") package.info_url = "#{base_url}##{pkgname}" package