Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 870295 - Missing IDEPENDs in md5-cache on rsync mirrors (was: sys-kernel/gentoo-kernel-bin: requires dracut)
Summary: Missing IDEPENDs in md5-cache on rsync mirrors (was: sys-kernel/gentoo-kernel...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Infrastructure
Classification: Unclassified
Component: Other (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Infrastructure
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-16 06:33 UTC by Vasco Gervasi
Modified: 2023-12-18 05:09 UTC (History)
7 users (show)

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


Attachments
emerge --info (emerge.info,13.96 KB, text/plain)
2022-09-16 06:34 UTC, Vasco Gervasi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vasco Gervasi 2022-09-16 06:33:43 UTC
Hi,
recently I have noted that dracut is not a dependecy of gentoo-kernel-bin.

Infact:

# emerge -1 gentoo-kernel-bin

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-kernel/gentoo-kernel-bin-5.19.9:5.19.9::gentoo  USE="initramfs -test" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-kernel/gentoo-kernel-bin-5.19.9
>>> Emerging (1 of 1) sys-kernel/gentoo-kernel-bin-5.19.9::gentoo
>>> Installing (1 of 1) sys-kernel/gentoo-kernel-bin-5.19.9::gentoo
>>> Failed to execute postinst for sys-kernel/gentoo-kernel-bin-5.19.9
>>> Jobs: 1 of 1 complete                           Load avg: 2.10, 1.83, 1.12

 * Messages for package sys-kernel/gentoo-kernel-bin-5.19.9:

 * FAILED postinst: 1
 * Building initramfs failed
 * 
 * The kernel files were copied to disk successfully but the kernel
 * was not deployed successfully.  Once you resolve the problems,
 * please run the equivalent of the following command to try again:
 * 
 *     emerge --config sys-kernel/gentoo-kernel-bin:5.19.9
 * ERROR: sys-kernel/gentoo-kernel-bin-5.19.9::gentoo failed (postinst phase):
 *   Kernel install failed, please fix the problems and run emerge --config sys-kernel/gentoo-kernel-bin:5.19.9
 * 
 * Call stack:
 *     ebuild.sh, line  122:  Called pkg_postinst
 *   environment, line 1672:  Called kernel-install_pkg_postinst
 *   environment, line 1225:  Called kernel-install_install_all '5.19.9-gentoo-dist'
 *   environment, line 1211:  Called die
 * The specific snippet of code:
 *           die "Kernel install failed, please fix the problems and run emerge --config ${CATEGORY}/${PN}:${SLOT}";
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/gentoo-kernel-bin-5.19.9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/gentoo-kernel-bin-5.19.9::gentoo'`.
 * The complete build log is located at '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/temp/environment'.
 * Working directory: '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/empty'
 * S: '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/work'

 * GNU info directory index is up-to-date. 

Reproducible: Always

Steps to Reproduce:
1.emerge -1 gentoo-kernel-bin
2.
3.
Actual Results:  
dracut is not found
Comment 1 Vasco Gervasi 2022-09-16 06:34:17 UTC
Created attachment 805426 [details]
emerge --info
Comment 2 Stephan Hartmann (RETIRED) gentoo-dev 2022-09-16 08:41:04 UTC
Please attach the full build.log.
Comment 3 Vasco Gervasi 2022-09-16 09:08:50 UTC
# emerge --config sys-kernel/gentoo-kernel-bin:5.19.9


Configuring pkg...

 * Assuming you do not have a separate /boot partition.
 * Building initramfs via dracut ...
/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/temp/environment: line 498: dracut: command not found                           [ !! ]
 * Building initramfs failed
 * 
 * The kernel files were copied to disk successfully but the kernel
 * was not deployed successfully.  Once you resolve the problems,
 * please run the equivalent of the following command to try again:
 * 
 *     emerge --config sys-kernel/gentoo-kernel-bin:5.19.9
 * ERROR: sys-kernel/gentoo-kernel-bin-5.19.9::gentoo failed (config phase):
 *   Kernel install failed, please fix the problems and run emerge --config sys-kernel/gentoo-kernel-bin:5.19.9
 * 
 * Call stack:
 *     ebuild.sh, line  122:  Called pkg_config
 *   environment, line 1662:  Called kernel-install_pkg_config
 *   environment, line 1215:  Called kernel-install_install_all '5.19.9-gentoo-dist'
 *   environment, line 1209:  Called die
 * The specific snippet of code:
 *           die "Kernel install failed, please fix the problems and run emerge --config ${CATEGORY}/${PN}:${SLOT}";
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/gentoo-kernel-bin-5.19.9::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/gentoo-kernel-bin-5.19.9::gentoo'`.
 * The complete build log is located at '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/temp/build.log'.
 * The ebuild environment file is located at '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/temp/environment'.
 * Working directory: '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/empty'
 * S: '/tmp/portage/sys-kernel/gentoo-kernel-bin-5.19.9/work/gentoo-kernel-bin-5.19.9'
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-16 11:53:55 UTC
At least according to yesterday's snapshot:

$ grep -Rl IDEPEND metadata/ | wc -l
51

For comparison, git mirrors have:

$ grep -Rl IDEPEND metadata/ | wc -l
1555

I'm guessing that Infra is still using a buggy Portage version to generate it.
Comment 5 John Helmert III archtester Gentoo Infrastructure gentoo-dev Security 2022-09-16 14:52:53 UTC
I've bumped Portage on infra boxes, it will take some time to deploy everywhere. I'm not quite sure where the metadata is generated, but I believe this should resolve itself with some time
Comment 6 Mike Gilbert gentoo-dev 2022-09-16 17:55:37 UTC
(In reply to John Helmert III from comment #5)
> I've bumped Portage on infra boxes, it will take some time to deploy
> everywhere. I'm not quite sure where the metadata is generated, but I
> believe this should resolve itself with some time

The metadata cache needs to be purged on the rsync master. Otherwise, the cache will not be updated until a version bump occurs or an eclass changes.
Comment 7 Alec Warner (RETIRED) archtester gentoo-dev Security 2022-09-16 22:14:45 UTC
I believe we have made the necessary changes in metadata generation and the fixed generated metadata should be making its way to users in the next 24h.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2022-09-17 06:05:54 UTC
gentoo-20220916 snapshot looks fine:

$ grep -Rl IDEPEND metadata/ | wc -l
1554
Comment 9 Larry the Git Cow gentoo-dev 2023-02-19 19:19:47 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/portage.git/commit/?id=22406d51ccaa743da4fd4c45e0fbaca09ffb1eba

commit 22406d51ccaa743da4fd4c45e0fbaca09ffb1eba
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-02-18 12:42:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-02-19 19:19:44 +0000

    tests: dbapi: add basic metadata test (IDEPEND)
    
    In f9f55b42f1602e79a5541afcace6b2a30af394e8, I fixed the generation of IDEPEND
    metadata. It turns out we don't have suitable test coverage here.
    
    Add a basic test to make sure that:
    - IDEPEND survives cache generation and appears in the resultant cache;
    - IDEPEND accumulates across inherits (which is what the actual bug was, in a sense).
    
    This test fails with the fix for the bug (f9f55b42f1602e79a5541afcace6b2a30af394e8) reverted.
    
    We need to be testing various bits of newer EAPIs more (not least to ensure
    we don't forget to update one of the various parts of Portage when adding a new one)
    but this is a start.
    
    Bug: https://bugs.gentoo.org/870295
    See: f9f55b42f1602e79a5541afcace6b2a30af394e8
    Signed-off-by: Sam James <sam@gentoo.org>

 lib/portage/tests/dbapi/test_portdb_cache.py | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)