Created attachment 375646 [details, diff] dracut-037.ebuild.patch 1. Current kernel config check is too complicated and it doesn't work :) For example if dracut is installed from binary package it always complain about missing kernel config. I believe the current implementation could be fixed in the following way (didn't test it): @@ -186,7 +186,8 @@ } pkg_postinst() { - if linux-info_get_any_version && linux_config_src_exists; then + linux-info_get_any_version + if linux_config_exists; then ewarn "" ewarn "If the following test report contains a missing kernel" ewarn "configuration option, you should reconfigure and rebuild your" Alternative solution is in attached patch. 2. If SYMLINK_LIB=no is set on multilib amd64 system, then /lib and /usr/lib contains libraries for 32 bit ABI. They are useless in initramfs and adds 0.9-1.2Mb to its size (32bit libc, libnss_*, etc). Other arches with multiple ABIs have the same issue. This is fixed in attached patch.
I've committed SYMLINK_LIB part. Not sure about check, yet.
(In reply to Alexander Tsoy from comment #0) > 1. Current kernel config check is too complicated and it doesn't work :) For > example if dracut is installed from binary package it always complain about > missing kernel config. I believe the current implementation could be fixed > in the following way (didn't test it): > > [...] > > Alternative solution is in attached patch. So... basically you have moved check to pkg_pretend, as far as I see. While it is a good idea to have it there anyway, does it fix a problem you have mentioned?
I just tried to install dracut from binary package and it doesn't complain about missing kernel config anymore.
The only thing I don't understand is why you reimplemented the logic which is already exist in linux-info.eclass in function check_extra_config().
(In reply to Alexander Tsoy from comment #4) > The only thing I don't understand is why you reimplemented the logic which > is already exist in linux-info.eclass in function check_extra_config(). OK, I see at least one difference: you check existance of kernel sources with .config file (linux_config_src_exists()). But kernel sources are optional - you can build kernel on one host and install it on another host. check_extra_config() has a fallback and can check config of the running kernel (/proc/config.gz)
I use check_extra_config, but I wrap it to give more descriptive info.
Well.. What do you think about the following change? - if linux-info_get_any_version && linux_config_src_exists; then + if linux-info_get_any_version && linux_config_exists; then
Yes, you're right. Thank you Alexander! commit 22f8c70f262bd5d8c3f6b0fc4fb69693728c6af6