Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 508652 - sys-kernel/dracut - ebuild improvements
Summary: sys-kernel/dracut - ebuild improvements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2014-04-25 00:43 UTC by Alexander Tsoy
Modified: 2015-08-16 10:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
dracut-037.ebuild.patch (dracut-037.ebuild.patch,1.97 KB, patch)
2014-04-25 00:43 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2014-04-25 00:43:17 UTC
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.
Comment 1 Amadeusz Żołnowski (RETIRED) gentoo-dev 2014-05-14 07:12:26 UTC
I've committed SYMLINK_LIB part. Not sure about check, yet.
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-03-20 11:40:32 UTC
(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?
Comment 3 Alexander Tsoy 2015-03-31 22:40:33 UTC
I just tried to install dracut from binary package and it doesn't complain about missing kernel config anymore.
Comment 4 Alexander Tsoy 2015-03-31 22:50:19 UTC
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().
Comment 5 Alexander Tsoy 2015-03-31 22:59:36 UTC
(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)
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-04-01 07:46:50 UTC
I use check_extra_config, but I wrap it to give more descriptive info.
Comment 7 Alexander Tsoy 2015-07-16 00:07:41 UTC
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
Comment 8 Amadeusz Żołnowski (RETIRED) gentoo-dev 2015-08-16 10:06:48 UTC
Yes, you're right. Thank you Alexander!

commit 22f8c70f262bd5d8c3f6b0fc4fb69693728c6af6