[game-data-packager] 02/02: packaging: "INSTALL_CMD[0]" & "method" are the same thing
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Fri Jan 8 15:57:12 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 4498eb8d3b05046c460c72c62de34e59aa4a2513
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Fri Jan 8 16:55:04 2016 +0100
packaging: "INSTALL_CMD[0]" & "method" are the same thing
use again 'dnf' per default on Fedora
---
game_data_packager/build.py | 3 ++-
game_data_packager/packaging/arch.py | 2 +-
game_data_packager/packaging/deb.py | 2 +-
game_data_packager/packaging/rpm.py | 10 +++++-----
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index fe6a11d..c7a110f 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -2767,4 +2767,5 @@ class PackagingTask(object):
if packages:
logger.warning('installing these packages might help:\n' +
- '%s %s', self.packaging.INSTALL_CMD, ' '.join(sorted(packages)))
+ '%s %s', ' '.join(self.packaging.INSTALL_CMD),
+ ' '.join(sorted(packages)))
diff --git a/game_data_packager/packaging/arch.py b/game_data_packager/packaging/arch.py
index 12d30c7..48f6d2b 100644
--- a/game_data_packager/packaging/arch.py
+++ b/game_data_packager/packaging/arch.py
@@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
class ArchPackaging(PackagingSystem):
LICENSEDIR = 'usr/share/licenses'
CHECK_CMD = 'namcap'
- INSTALL_CMD = 'pacman -S'
+ INSTALL_CMD = ['pacman', '-S']
PACKAGE_MAP = {
'id-shr-extract': None,
'7z': 'p7zip',
diff --git a/game_data_packager/packaging/deb.py b/game_data_packager/packaging/deb.py
index 3496707..a9f1cf1 100644
--- a/game_data_packager/packaging/deb.py
+++ b/game_data_packager/packaging/deb.py
@@ -31,7 +31,7 @@ class DebPackaging(PackagingSystem):
BINDIR = 'usr/games'
ASSETS = 'usr/share/games'
CHECK_CMD = 'lintian'
- INSTALL_CMD = 'apt-get install'
+ INSTALL_CMD = ['apt-get', 'install']
PACKAGE_MAP = {
'id-shr-extract': 'dynamite',
'lha': 'lhasa',
diff --git a/game_data_packager/packaging/rpm.py b/game_data_packager/packaging/rpm.py
index 3505b55..cd88f0e 100644
--- a/game_data_packager/packaging/rpm.py
+++ b/game_data_packager/packaging/rpm.py
@@ -26,7 +26,7 @@ from ..util import (check_output, run_as_root)
logger = logging.getLogger(__name__)
class RpmPackaging(PackagingSystem):
- INSTALL_CMD = 'rpm -U'
+ INSTALL_CMD = ['rpm', '-U']
CHECK_CMD = 'rpmlint'
ARCH_DECODE = {
'all': 'noarch',
@@ -58,7 +58,7 @@ class RpmPackaging(PackagingSystem):
"""Install one or more packages (a list of filenames)."""
if not method:
- method = 'rpm'
+ method = self.INSTALL_CMD[0]
if method == 'dnf':
run_as_root(['dnf', 'install'] + list(rpms), gain_root)
@@ -80,7 +80,7 @@ class RpmPackaging(PackagingSystem):
class DnfPackaging(RpmPackaging):
LICENSEDIR = 'usr/share/licenses'
- INSTALL_CMD = 'dnf install'
+ INSTALL_CMD = ['dnf', 'install']
PACKAGE_MAP = {
'dpkg-deb': 'dpkg',
'id-shr-extract': None,
@@ -127,7 +127,7 @@ class DnfPackaging(RpmPackaging):
class ZypperPackaging(RpmPackaging):
DOCDIR = 'usr/share/doc/packages'
LICENSEDIR = 'usr/share/doc/packages'
- INSTALL_CMD = 'zypper install'
+ INSTALL_CMD = ['zypper', 'install']
PACKAGE_MAP = {
'dpkg-deb': 'dpkg',
'id-shr-extract': None,
@@ -159,7 +159,7 @@ class ZypperPackaging(RpmPackaging):
gain_root=gain_root)
class UrpmiPackaging(RpmPackaging):
- INSTALL_CMD = 'urpmi'
+ INSTALL_CMD = ['urpmi']
def get_distro_packaging():
if os.path.isfile('/etc/mageia-release'):
--
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