[game-data-packager] 01/01: add support for upcoming apt-get, see #47379
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Sat Aug 29 09:05:26 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 eebf3169b4b87e7c98339c8c280daf278f290982
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sat Aug 29 11:05:13 2015 +0200
add support for upcoming apt-get, see #47379
---
debian/changelog | 2 ++
game_data_packager/__init__.py | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/debian/changelog b/debian/changelog
index d47936b..85f9b74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ game-data-packager (43) UNRELEASED; urgency=medium
* add support for X-COM: UFO Defense (Closes: #793017)
* fix speeches altenatives in Broken Sword1 (Closes: #795624)
* Grim Fandango: add Brazilian & Spanish versions
+ * use apt-get 1.1 instead of dpkg to install local .deb if available;
+ this will automaticaly pull recommended engine
-- Simon McVittie <smcv at debian.org> Thu, 16 Jul 2015 09:59:23 +0200
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index 5115edc..7294eff 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -2825,7 +2825,14 @@ class GameData(object):
def install_packages(self, debs):
print('using su(1) to obtain root privileges and install the package(s)')
- cmd = 'dpkg -i'
+
+ apt_ver = subprocess.check_output(['dpkg-query', '--show',
+ '--showformat', '${Version}', 'apt'], universal_newlines=True)
+ if apt_ver[0:3] >= '1.1':
+ cmd = 'apt-get install --install-recommends'
+ else:
+ cmd = 'dpkg -i'
+
for deb in debs:
cmd = cmd + ' ' + shlex.quote(deb)
--
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