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
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))
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: pantsbuild/pants
Commit Name: b1545f2d4de791cefbe2cc1f8c102e053ba4c09b
Time: 2014-08-28
Author: zundel@squareup.com
File Name: src/python/pants/base/build_file_parser.py
Class Name: BuildFileParser
Method Name: parse_build_file
Project Name: mittagessen/kraken
Commit Name: 9f200d963b9646fb50326f7cf6788021ddfe955d
Time: 2018-04-08
Author: mittagessen@l.unchti.me
File Name: kraken/lib/models.py
Class Name:
Method Name: load_any