Skip to content

Instantly share code, notes, and snippets.

@carlwgeorge
Created November 23, 2021 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlwgeorge/50ed939bf615d1bc22d617336cc0f47b to your computer and use it in GitHub Desktop.
Save carlwgeorge/50ed939bf615d1bc22d617336cc0f47b to your computer and use it in GitHub Desktop.
script to compare the real EPEL repositories to Oracle's EPEL repositories
#!/usr/bin/python3
import repomd
epol7_repo = repomd.load('https://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/x86_64/')
epel7_repo = repomd.load('https://dl.fedoraproject.org/pub/epel/7/x86_64/')
epol8_repo = repomd.load('https://yum.oracle.com/repo/OracleLinux/OL8/developer/EPEL/x86_64/')
epel8_repo = repomd.load('https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/')
epel7_names = {p.name for p in epel7_repo if not p.arch == 'src'}
epol7_names = {p.name for p in epol7_repo if not p.arch == 'src'}
epel8_names = {p.name for p in epel8_repo if not p.arch == 'src'}
epol8_names = {p.name for p in epol8_repo if not p.arch == 'src'}
print()
print('epel7:')
print(f'{len(epel7_names)} package names in the real epel7')
print(f'{len(epol7_names)} package names in Oracle\'s epel7')
print(f'{len(epel7_names - epol7_names)} package names only in the real epel7')
print(f'{len(epol7_names - epel7_names)} package names only in Oracle\'s epel7')
print(f'{len(epel7_names & epol7_names)} package names in both')
print()
print('epel8:')
print(f'{len(epel8_names)} package names in the real epel8')
print(f'{len(epol8_names)} package names in Oracle\'s epel8')
print(f'{len(epel8_names - epol8_names)} package names only in the real epel8')
print(f'{len(epol8_names - epel8_names)} package names only in Oracle\'s epel8')
print(f'{len(epel8_names & epol8_names)} package names in both')
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment