[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[snapshot/master] Warn on duplicate keys



---
 snapshot |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/snapshot b/snapshot
index 0fdc6b1..8774d91 100755
--- a/snapshot
+++ b/snapshot
@@ -1099,10 +1099,15 @@ class PackageIndexer
 				e[lastkey] << line[1..-1]
 			else
 				key, value = line.split(/: */, 2)
-				e[key] = value if value != ""
+				if e[key]
+					$logger.warn("[indexrun ##{@mirrorrun_id}] dsc file #{path}/#{name} has duplicate key #{key}")
+				elsif value != ""
+					e[key] = value
+				end
 				lastkey = key
 			end
 			break if line == "" # skip pgp footer
+			break if line == "-----BEGIN PGP SIGNATURE-----"
 		end
 
 		unless hash_has_all_keys(e, %w(Source Version Files))
-- 
1.7.2.5



Reply to: