[reprotest] 02/04: ENH: lib: add a system_interface instance for Arch-Linux
Ximin Luo
infinity0 at debian.org
Thu Aug 17 18:05:57 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit ce927007e2998334a2bcc5a5c81496d70d306b0d
Author: Santiago Torres <torresariass at gmail.com>
Date: Wed Jul 12 11:16:12 2017 -0400
ENH: lib: add a system_interface instance for Arch-Linux
Arch requires a different system_interface abstraction than Debian. Add
an arch-specific module to handle the required calls from adt_testbed.
---
reprotest/lib/system_interface/{debian.py => arch.py} | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/reprotest/lib/system_interface/debian.py b/reprotest/lib/system_interface/arch.py
similarity index 76%
copy from reprotest/lib/system_interface/debian.py
copy to reprotest/lib/system_interface/arch.py
index dc0792c..3f4511b 100644
--- a/reprotest/lib/system_interface/debian.py
+++ b/reprotest/lib/system_interface/arch.py
@@ -26,22 +26,20 @@ import subprocess
from . import SystemInterface
-
-class DebianInterface(SystemInterface):
+class ArchInterface(SystemInterface):
"""
- SystemInterface implementation for Debian hosts. Contains commands that
- are specific to the Debian toolchain.
+ SystemInterface implementation for Arch Linux hosts. Contains commands that
+ are specific to the Arch Linux toolchain.
"""
def get_arch(self):
- return ['dpkg', '--print-architecture']
+ return ['uname', '-m']
def get_installed_packages(self, target_file):
- return ['sh', '-ec',
- "dpkg-query --show -f '${Package}\\t${Version}\\n' > %s" % target_file.tb]
+ return ['sh', '-ec', "pacman -Q > %s" % target_file.tb]
def can_query_packages(self):
try:
- return subprocess.check_call(['which', 'dpkg-query'], stdout=subprocess.DEVNULL) == 0
+ return subprocess.check_call(['which', 'pacman'], stdout=subprocess.DEVNULL) == 0
except subprocess.CalledProcessError:
return 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git
More information about the Reproducible-commits
mailing list