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

Before Change



def YumInstall(vm):
  Installs epel-release repo.
  try:
    vm.InstallPackages("epel-release")
  except errors.VirtualMachine.RemoteCommandError:
    stdout, _ = vm.RemoteCommand("cat /etc/redhat-release")
    major_version = int(re.search("release ([0-9])", stdout).group(1))
    if major_version == 6:
      epel_rpm = EPEL6_RPM
    elif major_version == 7:
      epel_rpm = EPEL7_RPM
    else:
      raise
    vm.InstallPreprovisionedPackageData(
        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 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(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: c27bc543680442ceb979c18738115b01dd963f28
Time: 2019-04-29
Author: deitz@google.com
File Name: perfkitbenchmarker/linux_benchmarks/coremark_benchmark.py
Class Name:
Method Name: Prepare