From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 450BE13933E for ; Sat, 10 Jul 2021 08:22:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A501E0DF2; Sat, 10 Jul 2021 08:22:45 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CABA3E0B18 for ; Sat, 10 Jul 2021 08:22:44 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1m28G3-0005N8-8T for gentoo-user@lists.gentoo.org; Sat, 10 Jul 2021 10:22:43 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-user] Re: Since when does module-rebuild delete modules for previous kernel version? Date: Sat, 10 Jul 2021 11:22:38 +0300 Message-ID: References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 In-Reply-To: Content-Language: en-US X-Archives-Salt: 544a7381-adc6-4b99-a10a-e51e61d6b6a6 X-Archives-Hash: d0b96a852876535307be2412ac183774 On 08/07/2021 02:09, Nikos Chantziaras wrote: > So I just noticed that when I run: > > emerge @module-rebuild > > after having installed a kernel update, the kernel modules of the > previous kernel version are being deleted. I am sure this didn't use to > be the case. Found the issue. On my new system, I had this in my make.conf: UNINSTALL_IGNORE="/usr/src" because /usr/src is a symlink to a directory on my HDD (as I don't want to write all that data to my SSD.) Portage would bark about it during depclean if I don't put that in UNINSTALL_IGNORE. From "man make.conf": UNINSTALL_IGNORE = [space delimited list of fnmatch patterns] This variable prevents uninstallation of files that match specific fnmatch(3) patterns. [...] Defaults to "/lib/modules/*". Right. However, it's obvious I've hit a portage inconsistency here. For example, when I use: CONFIG_PROTECT="blah" in make.conf, "blah" is appended to CONFIG_PROTECT. But for whatever reason, this is not the case for UNINSTALL_IGNORE. It completely nukes the default value instead. I had to change this to: UNINSTALL_IGNORE="${UNINSTALL_IGNORE} /usr/src" and now all is fine.