[game-data-packager] 01/01: fedora: port get_architecture()
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Mon Nov 2 11:28:37 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 818d5fd2fe24d60386c1813e4e77a37530d3f0dc
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon Nov 2 12:27:46 2015 +0100
fedora: port get_architecture()
self._foreign_architectures is stubbed
---
game_data_packager/build.py | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 8f309ed..7a72106 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -2018,11 +2018,19 @@ class PackagingTask(object):
def get_architecture(self, archs=''):
if self._architecture is None:
- self._architecture = check_output(['dpkg',
- '--print-architecture']).strip().decode('ascii')
- self._foreign_architectures = set(check_output(['dpkg',
- '--print-foreign-architectures']
- ).strip().decode('ascii').split())
+ if FORMAT == 'deb':
+ self._architecture = check_output(['dpkg',
+ '--print-architecture']).strip().decode('ascii')
+ self._foreign_architectures = set(check_output(['dpkg',
+ '--print-foreign-architectures']
+ ).strip().decode('ascii').split())
+ elif FORMAT == 'rpm':
+ arch = check_output(['rpm', '-q', '--qf', '%{ARCH}\n',
+ 'rpm']).strip().decode('ascii')
+ self._architecture = { 'armhfp': 'armhf',
+ 'x86_64': 'amd64',
+ }.get(arch, arch)
+ self._foreign_architectures = set()
if archs:
# In theory this should deal with wildcards like linux-any,
--
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