Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Kernel config checker
#!/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)
@CapXilinx

This comment has been minimized.

Copy link

@CapXilinx CapXilinx commented Aug 12, 2020

Hi.

First thanks for the script, I used it a lot in the last years.
Unfortunately it stopped working for me, as it seems to hang at the first checked package (in my case ppp)

Could you give a hint what could cause this?

Best regards,
Martin

@zmedico

This comment has been minimized.

Copy link

@zmedico zmedico commented Aug 17, 2020

Hi.

First thanks for the script, I used it a lot in the last years.
Unfortunately it stopped working for me, as it seems to hang at the first checked package (in my case ppp)

Could you give a hint what could cause this?

Best regards,
Martin

It's this bug: https://bugs.gentoo.org/737698

@zmedico

This comment has been minimized.

Copy link

@zmedico zmedico commented Jun 26, 2021

Hi.
First thanks for the script, I used it a lot in the last years.
Unfortunately it stopped working for me, as it seems to hang at the first checked package (in my case ppp)
Could you give a hint what could cause this?
Best regards,
Martin

It's this bug: https://bugs.gentoo.org/737698

There's a new implementation from https://bugs.gentoo.org/758755 in gentoo/portage@dcbcac8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment