Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 825790 - sys-apps/coreutils-9.0-r1 fails to compile: __eapi7_ver_compare: invalid version:
Summary: sys-apps/coreutils-9.0-r1 fails to compile: __eapi7_ver_compare: invalid vers...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-22 07:37 UTC by Agostino Sarubbo
Modified: 2022-01-09 07:41 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-11-22 07:37:58 UTC
>>> Running pre-merge checks for sys-apps/coreutils-9.0-r1
 * Checking for running ZFS module version
 * ERROR: sys-apps/coreutils-9.0-r1::gentoo failed (pretend phase):
 *   __eapi7_ver_compare: invalid version: 
 * 
 * Call stack:
 *                 ebuild.sh, line 127:  Called pkg_pretend
 *   coreutils-9.0-r1.ebuild, line  85:  Called ver_test '' '-lt' '2.0.7'
 *        eapi7-ver-funcs.sh, line 189:  Called __eapi7_ver_compare '' '2.0.7'
 *        eapi7-ver-funcs.sh, line  99:  Called die
 * The specific snippet of code:
 *      [[ ${va} =~ ${re} ]] || die "${FUNCNAME}: invalid version: ${va}"
 * 
 * If you need support, post the output of `emerge --info '=sys-apps/coreutils-9.0-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/coreutils-9.0-r1::gentoo'`.
 * The complete build log is located at '/var/log/emerge-log/build/sys-apps/coreutils-9.0-r1:20211122-073635.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/sys-apps/coreutils-9.0-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-apps/coreutils-9.0-r1/temp/die.env'.
 * Working directory: '/var/tmp/portage/sys-apps/coreutils-9.0-r1/empty'
 * S: '/var/tmp/portage/sys-apps/coreutils-9.0-r1/work/coreutils-9.0'
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-22 07:41:16 UTC
Do you have zfs-kmod installed?
Comment 2 Agostino Sarubbo gentoo-dev 2021-11-22 07:43:22 UTC
(In reply to Sam James from comment #1)
> Do you have zfs-kmod installed?

$ eix zfs -I
[I] sys-fs/zfs
     Available versions:  0.8.6-r1(0/2)^t 2.0.6-r1(0/4)^t (~)2.1.1-r5(0/5)^t **9999(0/5)*l^t {custom-cflags debug dist-kernel kernel-builtin minimal nls pam python +rootfs split-usr test-suite verify-sig KERNEL="linux" PYTHON_TARGETS="python3_8 python3_9 python3_10"}
     Installed versions:  2.1.1-r5(0/5)^t(06:36:18 11/22/21)(nls pam rootfs split-usr -custom-cflags -debug -dist-kernel -kernel-builtin -minimal -python -test-suite -verify-sig KERNEL="linux" PYTHON_TARGETS="python3_8 python3_9 python3_10")
     Homepage:            https://github.com/openzfs/zfs
     Description:         Userland utilities for ZFS Linux kernel module

[I] sys-fs/zfs-kmod
     Available versions:  0.8.6(0/0.8.6)^st 2.0.6(0/2.0.6)^st (~)2.1.1-r3(0/2.1.1-r3)^st **9999(0/9999)*l^st {custom-cflags debug dist-kernel +rootfs verify-sig KERNEL="linux"}
     Installed versions:  2.1.1-r3(0/2.1.1-r3)^t(06:32:43 11/22/21)(rootfs -custom-cflags -debug -dist-kernel -verify-sig KERNEL="linux")
     Homepage:            https://github.com/openzfs/zfs
     Description:         Linux ZFS kernel module for sys-fs/zfs

Found 2 matches
Comment 3 Georgy Yakovlev archtester gentoo-dev 2021-11-23 02:22:42 UTC
probably not loaded.
version check might need a failsafe against that scenario.
Comment 4 Georgy Yakovlev archtester gentoo-dev 2021-11-23 02:31:03 UTC
I think extending pretend check to this

if has_version "<sys-fs/zfs-9999" && grep zfs <(lsmod 2>/dev/null); then
...


should avoid this failure scenario.

unfortunately I don't have a system where I can unload zfs module to test it.
Comment 5 Georgy Yakovlev archtester gentoo-dev 2021-11-23 02:31:59 UTC
grep should be quitet ofc, grep -q
Comment 6 programming 2021-12-19 07:44:43 UTC
I can confirm your proposed change works.
Comment 7 Larry the Git Cow gentoo-dev 2021-12-19 11:23:22 UTC
The bug has been closed via the following commit(s):

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

commit f3f93fcad23b37c0ba4bd7af4512645cc19d003e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2021-12-19 11:20:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-12-19 11:20:59 +0000

    sys-apps/coreutils: skip ZFS check when ZFS module not loaded
    
    Closes: https://bugs.gentoo.org/825790
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/coreutils/coreutils-9.0-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)