Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832337 - dev-util/unicorn-2.0.0_rc5: Fails to install after emerge
Summary: dev-util/unicorn-2.0.0_rc5: Fails to install after emerge
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: mario.haustein
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-29 17:41 UTC by Stefan Huber
Modified: 2022-02-02 01:04 UTC (History)
2 users (show)

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


Attachments
emerge --info (emerge-info.txt,6.98 KB, text/plain)
2022-01-29 17:42 UTC, Stefan Huber
Details
build.log (build.log,735.03 KB, text/plain)
2022-01-29 17:43 UTC, Stefan Huber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Huber 2022-01-29 17:41:32 UTC
Installing dev-util/unicorn-2.0.0_rc5 fails due to this error:

adding 'unicorn-2.0.0rc5.post1.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
 *   Installing the wheel to /var/tmp/portage/dev-util/unicorn-2.0.0_rc5/work/unicorn-2.0.0-rc5_build-python3_9/install
/usr/bin/python3.9: No module named installer
 * ERROR: dev-util/unicorn-2.0.0_rc5::gentoo failed (compile phase):
 *   installer failed

I shall mention that the ebuild from pentoo, which I copied to a local repo, installs fine. However, it only installs unicorn_targets_x86, where as gentoo's ebuild does not support setting the unicorn targets, i.e., it enables them all.

Reproducible: Always
Comment 1 Stefan Huber 2022-01-29 17:42:09 UTC
Created attachment 763905 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-29 17:42:51 UTC
I think this might be something else rather than targets, more PEP517 related.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-29 17:43:00 UTC
Can you attach the full build.log? Thanks.
Comment 4 Stefan Huber 2022-01-29 17:43:42 UTC
Created attachment 763906 [details]
build.log
Comment 5 Stefan Huber 2022-01-29 17:44:28 UTC
(In reply to Sam James from comment #3)
> Can you attach the full build.log? Thanks.

You are just to quick for me to push the buttons. ;)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-29 19:06:06 UTC
(In reply to Stefan Huber from comment #5)
> (In reply to Sam James from comment #3)
> > Can you attach the full build.log? Thanks.
> 
> You are just to quick for me to push the buttons. ;)

:D

Is dev-python/installer installed?
Comment 7 mario.haustein 2022-01-29 19:40:46 UTC
I can confirm `DISTUTILS_USE_PEP517=setuptools` is the root cause, as I experience the same issue on my system. It has nothing to do with the targets. This feature was intentionally omitted to get this ebuild into Gentoo more easily, because otherwise a new USE_EXPAND variable had to be introduced.

After installing `dev-python/wheel` and `dev-python/installer` the ebuild installed successfully. It seems the build time dependencies for PEP517-based ebuilds are not handled correctly by portage. Hopefully Sam is able to clear up the situation as these internals are beyond my knowledge.
Comment 8 Stefan Huber 2022-01-30 08:33:39 UTC
(In reply to Sam James from comment #6)
> Is dev-python/installer installed?

After installing dev-python/installer, unicorn emerged fine.

At the end I got:

 * Messages for package dev-util/unicorn-2.0.0_rc5:

 * QA Notice: DISTUTILS_USE_SETUPTOOLS is not used when DISTUTILS_OPTIONAL
 * is enabled.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-31 03:08:25 UTC Comment hidden (obsolete)
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-31 03:14:39 UTC
I think I get it.

```
$ grep "DEPEND" /var/db/repos/gentoo/metadata/md5-cache/dev-util/unicorn-2.0.0_rc5
BDEPEND=virtual/pkgconfig dev-util/ninja >=dev-util/cmake-3.20.5
DEPEND=python_targets_python3_9? ( >=dev-lang/python-3.9.9-r1:3.9 ) python_targets_python3_10? ( >=dev-lang/python-3.10.0_p1-r1:3.10 ) dev-libs/glib:2
RDEPEND=python? ( python_targets_python3_9? ( >=dev-lang/python-3.9.9-r1:3.9 ) python_targets_python3_10? ( >=dev-lang/python-3.10.0_p1-r1:3.10 ) )
```

We set DISTUTILS_OPTIONAL which means we have to manage dependencies ourselves, although I found it unexpected that ${PYTHON_DEPS} only includes the runtime deps (not installer and so on), I guess it makes sense.

I don't think there's an easy "fix"/change for distutils-r1.eclass here - maybe just a doc change? I'll just have to inline the deps for now anyway.

(I'm not sure I get why you got that QA warning given we don't set DISTUTILS_USE_SETUPTOOLS though.)
Comment 11 Larry the Git Cow gentoo-dev 2022-01-31 03:19:09 UTC
The bug has been closed via the following commit(s):

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

commit 3c7c7194dcd4b12cfeed0aae4222974015a97e6e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-31 03:18:06 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-01-31 03:19:02 +0000

    dev-util/unicorn: fix Python dependencies (BDEPEND)
    
    I'm not sure there's anything distutils-r1.eclass can do for us here, so
    it is what it is, but we need to inline the deps from the eclass as we've
    set DISTUTILS_OPTIONAL to only do the Python parts w/ USE=python.
    
    Closes: https://bugs.gentoo.org/832337
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/unicorn/unicorn-2.0.0_rc5.ebuild |  9 ++++++++-
 dev-util/unicorn/unicorn-9999.ebuild      | 10 +++++++++-
 2 files changed, 17 insertions(+), 2 deletions(-)
Comment 12 Larry the Git Cow gentoo-dev 2022-02-01 18:33:41 UTC
The bug has been referenced in the following commit(s):

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

commit e321a72564094603b5cb8c43dd7a54f970e1aa79
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2022-01-31 08:39:49 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2022-02-01 18:33:20 +0000

    distutils-r1.eclass: Add DISTUTILS_DEPS output var for PEP 517 mode
    
    The PEP 517 build-time deps have gotten more complex, and largely depend
    on the internal eclass logic used to build and install wheels.
    Introduce a DISTUTILS_DEPS output variable that contains the correct
    BDEPEND string for use in DISTUTILS_OPTIONAL=1 ebuilds.
    
    Bug: https://bugs.gentoo.org/832337
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 eclass/distutils-r1.eclass | 34 +++++++++++++++++++++++++++++++++-
 1 file changed, 33 insertions(+), 1 deletion(-)
Comment 13 Larry the Git Cow gentoo-dev 2022-02-02 01:04:46 UTC
The bug has been referenced in the following commit(s):

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

commit 866952d86fc60ca297558c7c4fe8e06ec43afb9c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-01-31 20:38:50 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-02-02 01:04:22 +0000

    dev-util/unicorn: update for distutlis-r1.eclass' DISTUTILS_DEPS var
    
    Bug: https://bugs.gentoo.org/832337
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/unicorn/unicorn-2.0.0_rc5.ebuild | 8 +-------
 dev-util/unicorn/unicorn-9999.ebuild      | 8 +-------
 2 files changed, 2 insertions(+), 14 deletions(-)