Beispiel #1
0
 def install_packages(self, package_names):
     try:
         self._exec_cmd_chroot('zypper --non-interactive install %s' %
                               " ".join(package_names))
     except exception.CoriolisException as err:
         raise exception.FailedPackageInstallationException(
             package_names=package_names,
             package_manager='zypper',
             error=str(err)) from err
Beispiel #2
0
 def install_packages(self, package_names):
     try:
         apt_get_cmd = 'apt-get install %s -y' % " ".join(package_names)
         self._exec_cmd_chroot(apt_get_cmd)
     except Exception as err:
         raise exception.FailedPackageInstallationException(
             package_names=package_names,
             package_manager='apt',
             error=str(err)) from err
Beispiel #3
0
 def install_packages(self, package_names):
     try:
         apt_get_cmd = ('/bin/bash -c "DEBIAN_FRONTEND=noninteractive '
                        'apt-get install %s -y"' % " ".join(package_names))
         self._exec_cmd_chroot(apt_get_cmd)
     except Exception as err:
         raise exception.FailedPackageInstallationException(
             package_names=package_names,
             package_manager='apt',
             error=str(err)) from err
Beispiel #4
0
 def _yum_install(self, package_names, enable_repos=[]):
     try:
         yum_cmd = 'yum install %s -y%s' % (
             " ".join(package_names), "".join(
                 [" --enablerepo=%s" % r for r in enable_repos]))
         self._exec_cmd_chroot(yum_cmd)
     except exception.CoriolisException as err:
         raise exception.FailedPackageInstallationException(
             package_names=package_names,
             package_manager='yum',
             error=str(err)) from err