[game-data-packager] 01/01: mageia: initial stubbed support, test rpm fallbacks
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Fri Jan 8 12:41:33 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 c93005acf15cfaf0765171602fa09f54b7f60831
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Fri Jan 8 13:38:49 2016 +0100
mageia: initial stubbed support, test rpm fallbacks
It's not like there are an unlimited number
of rpm-based distro's...
Well the 3 big ones are covered:
https://en.wikipedia.org/wiki/Category:RPM-based_Linux_distributions
---
game_data_packager/packaging/rpm.py | 7 +++++++
game_data_packager/version.py | 5 +++++
2 files changed, 12 insertions(+)
diff --git a/game_data_packager/packaging/rpm.py b/game_data_packager/packaging/rpm.py
index da95457..2e72676 100644
--- a/game_data_packager/packaging/rpm.py
+++ b/game_data_packager/packaging/rpm.py
@@ -26,6 +26,7 @@ from ..util import (check_output, run_as_root)
logger = logging.getLogger(__name__)
class RpmPackaging(PackagingSystem):
+ INSTALL_CMD = 'rpm -U'
CHECK_CMD = 'rpmlint'
ARCH_DECODE = {
'all': 'noarch',
@@ -163,7 +164,13 @@ class ZypperPackaging(RpmPackaging):
super(ZypperPackaging, self).install_packages(rpms, method=method,
gain_root=gain_root)
+class UrpmiPackaging(RpmPackaging):
+ INSTALL_CMD = 'urpmi'
+
def get_distro_packaging():
+ if os.path.isfile('/etc/mageia-release'):
+ return UrpmiPackaging()
+
if os.path.isfile('/etc/redhat-release'):
return DnfPackaging()
diff --git a/game_data_packager/version.py b/game_data_packager/version.py
index 9e419cf..e7ef868 100644
--- a/game_data_packager/version.py
+++ b/game_data_packager/version.py
@@ -18,6 +18,11 @@ if os.path.isfile('/etc/debian_version'):
FORMAT = 'deb'
DISTRO = 'generic'
+# mageia also has a /etc/redhat-lease
+elif os.path.isfile('/etc/mageia-release'):
+ FORMAT = 'rpm'
+ DISTRO = 'mageia'
+
elif os.path.isfile('/etc/redhat-release'):
FORMAT = 'rpm'
DISTRO = 'fedora'
--
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