[Git][reproducible-builds/reprotest][master] 2 commits: Add FedoraInterface

Mattia Rizzolo gitlab at salsa.debian.org
Mon Apr 29 13:26:20 CEST 2019



Mattia Rizzolo pushed to branch master at Reproducible Builds / reprotest


Commits:
6b8c43aa by Thomas Coldrick at 2019-03-28T15:45:50Z
Add FedoraInterface

- - - - -
f98bc33c by Mattia Rizzolo at 2019-04-29T11:25:59Z
Merge branch 'coldtom/fedora-host' of salsa.debian.org:coldtom-guest/reprotest

MR: https://salsa.debian.org/reproducible-builds/reprotest/merge_requests/3
Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


2 changed files:

- reprotest/lib/adt_testbed.py
- + reprotest/lib/system_interface/fedora.py


Changes:

=====================================
reprotest/lib/adt_testbed.py
=====================================
@@ -39,12 +39,14 @@ import urllib.parse
 
 from reprotest.lib.system_interface.debian import DebianInterface
 from reprotest.lib.system_interface.arch import ArchInterface
+from reprotest.lib.system_interface.fedora import FedoraInterface
 from reprotest.lib import adtlog
 from reprotest.lib import VirtSubproc
 
 SYSTEM_INTERFACES = {
         'debian': DebianInterface,
-        'arch': ArchInterface
+        'arch': ArchInterface,
+        'fedora': FedoraInterface,
         }
 
 timeouts = {'short': 100, 'copy': 300, 'install': 3000, 'test': 10000,


=====================================
reprotest/lib/system_interface/fedora.py
=====================================
@@ -0,0 +1,21 @@
+import subprocess
+
+from . import SystemInterface
+
+class FedoraInterface(SystemInterface):
+    """
+        SystemInterface implementation for Fedora hosts. Contains commands
+        that are specific to the Fedora toolchain.
+    """
+
+    def get_arch(self):
+        return ['uname', '-m']
+
+    def get_installed_packages(self, target_file):
+        return ['sh', '-ec', 'rpm -qa > %s' % target_file.tb]
+
+    def can_query_packages(self):
+        try:
+            return subprocess.check_call(['which', 'rpm'],stdout=subprocess.DEVNULL) == 0
+        except subprocess.CalledProcessError:
+            return 0



View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/compare/ef00b42100fe3b5d4abc90a118f64dc49ee6883d...f98bc33ce13bf040728aa419ba3b20aa31f28e56

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reprotest/compare/ef00b42100fe3b5d4abc90a118f64dc49ee6883d...f98bc33ce13bf040728aa419ba3b20aa31f28e56
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20190429/49639346/attachment.html>


More information about the rb-commits mailing list