9121332c18e024d417d1aeb189ec98f295ffc694,perfkitbenchmarker/linux_packages/epel_release.py,,YumInstall,#Any#,47

Before Change


        PACKAGE_NAME,
        PREPROVISIONED_DATA.keys(),
        INSTALL_DIR)
    vm.RemoteCommand("sudo rpm -ivh --force %s" % posixpath.join(
        INSTALL_DIR, epel_rpm))
  vm.InstallPackages("yum-utils")
  vm.RemoteCommand("sudo yum-config-manager --enable epel")

After Change


  if vm.OS_TYPE not in _EPEL_URLS:
    raise errors.Setup.InvalidConfigurationError(
        "os_type {} not in {}".format(vm.OS_TYPE, sorted(_EPEL_URLS)))
  if IsEpelRepoInstalled(vm):
    logging.info("EPEL repo already installed")
    return
  url = _EPEL_URLS[vm.OS_TYPE]
  if url:
    vm.InstallPackages(url)
  if vm.OS_TYPE in _EPEL_CMDS:
    vm.RemoteCommand(_EPEL_CMDS[vm.OS_TYPE])
  vm.InstallPackages("yum-utils")
  vm.RemoteCommand("sudo yum-config-manager --enable epel")
  if not IsEpelRepoInstalled(vm):
    raise ValueError("EPEL repos {} not in {}".format(
        sorted(_EPEL_REPO_IDS), sorted(Repolist(vm))))


def IsEpelRepoInstalled(vm):
  return bool(Repolist(vm).intersection(_EPEL_REPO_IDS))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 9121332c18e024d417d1aeb189ec98f295ffc694
Time: 2020-07-28
Author: chriswilkes@google.com
File Name: perfkitbenchmarker/linux_packages/epel_release.py
Class Name:
Method Name: YumInstall


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 57905059321e5a4088cdb8e79048dfc6dc80d4ca
Time: 2021-03-06
Author: tohaowu@google.com
File Name: perfkitbenchmarker/linux_packages/mofed.py
Class Name:
Method Name: _Install


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 6bb36eb6d814bae4a8ab9274d30fe55bb60bdc23
Time: 2018-06-18
Author: yanfeiren@google.com
File Name: perfkitbenchmarker/linux_packages/hpcc.py
Class Name:
Method Name: _Install