[game-data-packager] 01/03: add new assert to check for mixed-up look_for that confuse GDP
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Mon Oct 19 10:19:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository game-data-packager.
commit 237b4a73ded7797d9597dd660164b0b907ad4089
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon Oct 19 12:15:55 2015 +0200
add new assert to check for mixed-up look_for that confuse GDP
---
game_data_packager/__init__.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 148eb6a..504416d 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -853,6 +853,17 @@ class GameData(object):
if f.sha256 is not None:
self.known_sha256s.setdefault(f.sha256, set()).add(filename)
+ # check for different files that shares same md5 & look_for
+ for file in self.known_md5s:
+ if len(self.known_md5s[file]) == 1:
+ continue
+ all_lf = set()
+ for f in self.known_md5s[file]:
+ assert not all_lf.intersection(self.files[f].look_for),(
+ 'duplicate file description in %s: %s' %
+ (self.shortname, ', '.join(self.known_md5s[file])) )
+ all_lf |= self.files[f].look_for
+
# consistency check
for package in self.packages.values():
for provider in package.install_contents_of:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list