[game-data-packager] 01/01: scummvm: substitute install_to

Alexandre Detiste detiste-guest at moszumanska.debian.org
Thu Jan 7 13:43:41 UTC 2016


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 d1212ad8917ca0bf3f24d98f96977ec2906685b6
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Thu Jan 7 14:42:19 2016 +0100

    scummvm: substitute install_to
    
    doing just-in-time substitions in install_to
    means that these substituion must happen
    everywhare (also in doom_common etc...)
    
    ???
---
 game_data_packager/games/scummvm_common.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/game_data_packager/games/scummvm_common.py b/game_data_packager/games/scummvm_common.py
index f3c3960..11d6abb 100644
--- a/game_data_packager/games/scummvm_common.py
+++ b/game_data_packager/games/scummvm_common.py
@@ -128,8 +128,10 @@ class ScummvmTask(PackagingTask):
         entry['Type'] = 'Application'
         entry['Categories'] = 'Game;%sGame;' % self.game.genre.replace(' ','')
         gameid = package.gameid or self.game.gameid
+        install_to = self.packaging.substitute(package.install_to,
+                                               package.name).lstrip('/')
         if len(package.langs) == 1:
-            entry['Exec'] = 'scummvm -p /%s %s' % (package.install_to, gameid)
+            entry['Exec'] = 'scummvm -p /%s %s' % (install_to, gameid)
             self.packaging.override_lintian(destdir, package.name,
                     'desktop-command-not-in-package',
                     '%s/%s.desktop %s' % (appdir, package.name, 'scummvm'))
@@ -151,9 +153,9 @@ class ScummvmTask(PackagingTask):
                 f.write('done\n')
                 f.write(')\n')
                 f.write('if [ "$GAME_LANG" = "en" ]; then\n')
-                f.write('  scummvm -p /%s %s\n' % (package.install_to, gameid))
+                f.write('  scummvm -p /%s %s\n' % (install_to, gameid))
                 f.write('else\n')
-                f.write('  scummvm -q $GAME_LANG -p /%s %s\n' % (package.install_to, gameid))
+                f.write('  scummvm -q $GAME_LANG -p /%s %s\n' % (install_to, gameid))
                 f.write('fi\n')
             os.chmod(path, 0o755)
 

-- 
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