Last active
May 20, 2024 02:59
-
-
Save mrueg/cd19a20d2e712f61d2ea to your computer and use it in GitHub Desktop.
Kernel config checker
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/env python | |
# Checking installed packages using linux-info.eclass | |
# for necessary kernel options | |
import portage | |
vartree = portage.db[portage.root]['vartree'] | |
all_cpvs = vartree.dbapi.cpv_all() | |
settings = portage.config() | |
for cpv in all_cpvs: | |
inherit = vartree.dbapi.aux_get(cpv, ['INHERITED'])[0] | |
if 'linux-info' in inherit: | |
pv = portage.catsplit(cpv)[1] | |
cpvpath = vartree.dbapi.getpath(cpv)+'/'+pv+'.ebuild' | |
print('Checking: '+cpv) | |
portage.doebuild(cpvpath, 'clean', settings=settings, tree='vartree', | |
vartree=vartree) | |
portage.doebuild(cpvpath, 'setup', settings=settings, tree='vartree', | |
vartree=vartree) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's a new implementation from https://bugs.gentoo.org/758755 in gentoo/portage@dcbcac8.