Skip to content
Commits on Source (2)
......@@ -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,
......
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