[game-data-packager] 01/01: scummvmrc: avoid false positives
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Sat Oct 17 22:53:46 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 f58f34985e4c50b648fd9415878560f30a15855e
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sun Oct 18 00:53:20 2015 +0200
scummvmrc: avoid false positives
---
game_data_packager/games/scummvm_common.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/game_data_packager/games/scummvm_common.py b/game_data_packager/games/scummvm_common.py
index a367081..700a293 100644
--- a/game_data_packager/games/scummvm_common.py
+++ b/game_data_packager/games/scummvm_common.py
@@ -61,6 +61,15 @@ class ScummvmTask(PackagingTask):
def iter_extra_paths(self, packages):
super(ScummvmTask, self).iter_extra_paths(packages)
+ gameids = set()
+ for p in packages:
+ gameid = p.gameid or self.game.gameid
+ if gameid == 'agi-fanmade':
+ continue
+ gameids.add(gameid.split('-')[0])
+ if not gameids:
+ return
+
# http://wiki.scummvm.org/index.php/User_Manual/Configuring_ScummVM
rcfile = os.path.expanduser('~/.scummvmrc')
if not os.path.isfile(rcfile):
@@ -68,10 +77,9 @@ class ScummvmTask(PackagingTask):
config = configparser.ConfigParser()
config.read(rcfile, encoding='utf-8')
- gameids = set(p.gameid or self.game.gameid for p in packages)
for section in config.sections():
for gameid in gameids:
- if section.startswith(gameid):
+ if section.split('-')[0] == gameid:
if 'path' not in config[section]:
# invalid .scummvmrc
continue
--
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