Created
November 27, 2019 11:28
-
-
Save encukou/34463f5360460ee0763b0f138b4609b4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import dnf | |
cachedir = '_dnf_cache_dir' | |
the_arch = 'x86_64' | |
base = dnf.Base() | |
conf = base.conf | |
conf.cachedir = cachedir | |
conf.substitutions['releasever'] = '32' | |
conf.substitutions['basearch'] = the_arch | |
base.repos.add_new_repo('rawhide', conf, | |
baseurl=["http://download.fedoraproject.org/pub/fedora/linux/development/rawhide//Everything/$basearch/os/"]) | |
base.repos.add_new_repo('rawhide-source', conf, | |
baseurl=["http://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/source/tree/"]) | |
base.fill_sack(load_system_repo=False) | |
python27_src_packages = base.sack.query().filter(name='python27') | |
for pkg in python27_src_packages: | |
for provide in pkg.provides: | |
print('provide:', provide) | |
whatreqs = base.sack.query().filter(requires=provide) | |
for whatreq in whatreqs: | |
print('required by:', whatreq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment