

Yeah, +1VinzC wrote:I'd like to check application requirements for a kernel I'm about to configure. Is it possible to check the kernel prerequisites for installed applications but without reinstalling everything?
Code: Select all
find /var/db/pkg/ -name *.ebuild | xargs grep -H --color CONFIG_CHECKOpened about six years ago... guess we'll have to find ways beforehand, be it to submit them to bugzilla.netfab wrote:https://bugs.gentoo.org/532674

grep -r CONFIG_CHECK /var/db/pkgVinzC wrote:Thanks for the hint, Princess Nell. I've managed to have an idea of what would need my attention:It sort of works except when the variable contents is split across several lines or begins on a line right below the quotation mark (e.g. libvirt-6.2.0-r2). That's a start anyway.Code: Select all
find /var/db/pkg/ -name *.ebuild | xargs grep -H --color CONFIG_CHECK
Just that the number of not-an-ebuild files is hugely bigger:Anon-E-moose wrote:grep -r CONFIG_CHECK /var/db/pkg
Code: Select all
42171Code: Select all
1388Woah! That's just voodoo magick to meHu wrote:For less, you can use the slightly more redundant: xargs -a <( grep -rl CONFIG_CHECK /var/db/pkg/ --include='*.ebuild' ) less +/CONFIG_CHECK --.
Hu wrote:xargs -a <( grep -rl CONFIG_CHECK /var/db/pkg/ --include='*.ebuild' ) less +/CONFIG_CHECK --

You should ONLY find CONFIG_CHECK in the ebuilds, and it's pretty fast (ETA: I do sometimes forget I'm on an nvmeVinzC wrote:Just that the number of not-an-ebuild files is hugely bigger:Anon-E-moose wrote:grep -r CONFIG_CHECK /var/db/pkg
Code: Select all
grep -rl CONFIG_CHECK /var/db/pkg/ --include='*.ebuild' | \
while read PKG; do
PKG=${PKG#/var/db/pkg/} # Keep category/package
PKG=$(equery w ${PKG%/*.ebuild}) # Rid the trailing ebuild file and extension
echo "Checking $PKG..." && ebuild $PKG pretend && ebuild $PKG clean
doneCode: Select all
Checking /portage.d/portage/media-tv/kodi/kodi-18.4-r1.ebuild...
Checking /portage.d/portage/app-admin/conky/conky-1.10.8-r4.ebuild...
Checking /portage.d/portage/x11-drivers/nvidia-drivers/nvidia-drivers-390.132-r1.ebuild...
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 4.19.97-gentoo-nvidia-hardened
* Checking for suitable kernel configuration options... [ ok ]
Checking /portage.d/portage/x11-drivers/xf86-input-evdev/xf86-input-evdev-2.10.6.ebuild...
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 4.19.97-gentoo-nvidia-hardened
* Checking for suitable kernel configuration options... [ ok ]
...That was not funny...Anon-E-moose wrote:I do sometimes forget I'm on an nvme

Code: Select all
echo ---------------------------;grep -rl CONFIG_CHECK /var/db/pkg/ --include='*.ebuild'|
> while read PKG_FILE; do
> # echo Checking file $PKG_FILE
> PKG_FILE=${PKG_FILE#/var/db/pkg/} # Keep category/package
> # echo Checking file $PKG_FILE
> PKG_NAME_AND_REPO=$(dirname $PKG_FILE)
> # echo Checking repo $PKG_NAME_AND_REPO
> PKG_FILE=$(equery w ${PKG_FILE%/*.ebuild}) 2>null # Rid the trailing ebuild file and extension
> # echo Checking file $PKG_FILE
> PKG_NAME_AND_REPO+="::"$(basename $(dirname $(dirname $(dirname $PKG_FILE))))
> echo Checking $PKG_NAME_AND_REPO... && ebuild $PKG_FILE pretend 2>null && ebuild $PKG_FILE clean 2>null
> done
---------------------------
Checking media-libs/libv4l-1.16.6::gentoo...
Checking media-libs/mesa-20.2.0::gentoo...
* Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau
* Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau
* Ignoring USE=xa since VIDEO_CARDS does not contain freedreno, nouveau, or vmware
* Ignoring USE=xvmc since VIDEO_CARDS does not contain r600 or nouveau
Checking app-emulation/libvirt-6.7.0::gentoo...
Checking app-emulation/qemu-5.1.0-r1::gentoo...
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 5.4.70-gentoo-classic
* Checking for suitable kernel configuration options...
* You must enable KVM in your kernel to continue
* If you have an Intel CPU, you must enable KVM_INTEL in your kernel configuration.
* debugFS support required for kvm_stat
* Please check to make sure these options are set correctly.
* Failure to do so may cause unexpected problems.
Checking net-misc/networkmanager-1.26.0-r1::gentoo...
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 5.4.70-gentoo-classic
* Checking for SYSFS_DEPRECATED support ... [ ok ]
Checking net-misc/bridge-utils-1.6::gentoo...