Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703822 - =sys-kernel/vanilla-kernel-bin-5.4.6 : pkg_postinst(): has_version: invalid atom: ~sys-kernel/vanilla-kernel-bin-5.3.7-gentoo
Summary: =sys-kernel/vanilla-kernel-bin-5.4.6 : pkg_postinst(): has_version: invalid a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-26 10:14 UTC by Martin Gysel (bearsh)
Modified: 2019-12-28 20:34 UTC (History)
2 users (show)

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


Attachments
emerge info (emerge-info.txt,7.67 KB, text/plain)
2019-12-26 10:14 UTC, Martin Gysel (bearsh)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Gysel (bearsh) 2019-12-26 10:14:02 UTC
Created attachment 600622 [details]
emerge info

>>> Failed to execute postinst for sys-kernel/vanilla-kernel-bin-5.4.6

 * Messages for package sys-kernel/vanilla-kernel-bin-5.4.6:

 * This is an experimental package.  The built kernel and/or initramfs
 * may not work at all or fail with your bootloader configuration.  Please
 * make sure to keep a backup kernel available before testing it.

 * Messages for package sys-kernel/vanilla-kernel-bin-5.4.6:

 * FAILED postinst: 1
 * ERROR: sys-kernel/vanilla-kernel-bin-5.4.6::gentoo failed (postinst phase):
 *   has_version: invalid atom: ~sys-kernel/vanilla-kernel-bin-5.3.7-gentoo
 * 
 * Call stack:
 *          ebuild.sh, line 125:  Called pkg_postinst
 *        environment, line 549:  Called has_version '-r' '~sys-kernel/vanilla-kernel-bin-5.3.7-gentoo'
 *   phase-helpers.sh, line 929:  Called ___best_version_and_has_version_common '-r' '~sys-kernel/vanilla-kernel-bin-5.3.7-gentoo'
 *   phase-helpers.sh, line 910:  Called die
 * The specific snippet of code:
 *                      die "${FUNCNAME[1]}: invalid atom: ${atom}"
 * 
 * If you need support, post the output of `emerge --info '=sys-kernel/vanilla-kernel-bin-5.4.6::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-kernel/vanilla-kernel-bin-5.4.6::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-kernel/vanilla-kernel-bin-5.4.6/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-kernel/vanilla-kernel-bin-5.4.6/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-kernel/vanilla-kernel-bin-5.4.6/homedir'
 * S: '/var/tmp/portage/sys-kernel/vanilla-kernel-bin-5.4.6/work'
Comment 1 Markus Kaindl 2019-12-26 13:51:08 UTC
This also happens for sys-kernel/vanilla-kernel (without -bin).

Only happens, if /usr/src/linux still points to another linux-source with a version-string not existing for vanilla-kernel(-bin), e.g. gentoo-sources.
Comment 2 Larry the Git Cow gentoo-dev 2019-12-28 20:34:39 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63aed098518786d1b135a6c8665d84483be2f829

commit 63aed098518786d1b135a6c8665d84483be2f829
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-28 20:30:57 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-28 20:34:34 +0000

    sys-kernel/vanilla-kernel-bin: Verify version passed to has_version
    
    Verify the version read from /usr/src/linux symlink and make sure
    that it consists of plain [0-9.] before passing it to has_version.
    If it doesn't conform, it isn't our symlink anyway.
    
    Closes: https://bugs.gentoo.org/703822
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-kernel/vanilla-kernel-bin/vanilla-kernel-bin-5.4.6.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46fe7b1894a7fbbf7e29e7515eac4e5c78d4eee6

commit 46fe7b1894a7fbbf7e29e7515eac4e5c78d4eee6
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2019-12-28 20:29:45 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2019-12-28 20:34:33 +0000

    sys-kernel/vanilla-kernel: Verify version passed to has_version
    
    Verify the version read from /usr/src/linux symlink and make sure
    that it consists of plain [0-9.] before passing it to has_version.
    If it doesn't conform, it isn't our symlink anyway.
    
    Closes: https://bugs.gentoo.org/703822
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-kernel/vanilla-kernel/vanilla-kernel-5.4.6-r1.ebuild | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)