Created
August 22, 2024 22:48
-
-
Save carlwgeorge/58ae83707d0ec7509652d711899a1e4e to your computer and use it in GitHub Desktop.
list packages that were in CentOS 9 that are not in CentOS 10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import json | |
from urllib.request import urlopen | |
def get_pkgs(compose_url): | |
rpms_url = compose_url + 'compose/metadata/rpms.json' | |
with urlopen(rpms_url) as response: | |
data = json.loads(response.read()) | |
return { | |
# convert name-epoch:version-release.arch key to just the name | |
nevra.rsplit('.', maxsplit=1)[0].rsplit('-', maxsplit=2)[0] | |
# only packages from these repos are forbidden in epel | |
for repo in ['BaseOS', 'AppStream', 'CRB'] | |
for arch in data['payload']['rpms'][repo].keys() | |
for nevra in data['payload']['rpms'][repo][arch].keys() | |
} | |
pkgs_c9 = get_pkgs('https://composes.stream.centos.org/production/latest-CentOS-Stream/') | |
pkgs_c10 = get_pkgs('https://composes.stream.centos.org/stream-10/production/latest-CentOS-Stream/') | |
# packages that were in CentOS 9 but not are not in CentOS 10 | |
results = sorted(pkgs_c9 - pkgs_c10) | |
print('\n'.join(results)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment