Please port crda to EAPI 7 and use BDEPEND. Since it is still EAPI 6, it has DEPEND="dev-python/m2crypto" and a test with "has_version --host-root". This means the build will always fail if you try to install it with a crossdev emerge wrapper, since that adds --root-deps=rdeps which won't install DEPEND packages in ROOT=/. You need to know to manually "emerge m2crypto" to make crda install in a different root currently. Reproducible: Always Steps to Reproduce: 1. emerge crda # with a sysroot profile and without m2crypto installed Actual Results: Build fails in python_check_deps because m2crypto is not found. Expected Results: It should build and install.
I tested this change to keep Python dependencies in the build root: --- net-wireless/crda/crda-4.14.ebuild +++ net-wireless/crda/crda-4.14.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 PYTHON_COMPAT=( python3_{6,7,8} ) inherit toolchain-funcs python-any-r1 udev @@ -22,15 +22,11 @@ gcrypt? ( dev-libs/libgcrypt:0= ) dev-libs/libnl:3 net-wireless/wireless-regdb" -DEPEND="${RDEPEND} - ${PYTHON_DEPS} +DEPEND="${RDEPEND}" +BDEPEND="${PYTHON_DEPS} $(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]') virtual/pkgconfig" -python_check_deps() { - has_version --host-root "dev-python/m2crypto[${PYTHON_USEDEP}]" -} - PATCHES=( "${FILESDIR}"/${PN}-no-ldconfig.patch "${FILESDIR}"/${PN}-no-werror.patch
(In reply to David Michael from comment #1) > I tested this change to keep Python dependencies in the build root: > [...] Whey I try your patch it fails with: >>> Compiling source in /var/tmp/portage/net-wireless/crda-4.14/work/crda-4.14 ... make -j8 PREFIX=/usr SBINDIR=$(PREFIX)/sbin/ LIBDIR=$(PREFIX)/lib64 UDEV_RULE_DIR=/lib/udev/rules.d REG_BIN=/usr/lib/crda/regulatory.bin USE_OPENSSL=1 CC=x86_64-pc-linux-gnu-gcc V=1 WERROR= all_noverify ./utils/key2pub.py pubkeys/linville.key.pub.pem pubkeys/sforshee.key.pub.pem keys.c Traceback (most recent call last): File "/var/tmp/portage/net-wireless/crda-4.14/work/crda-4.14/./utils/key2pub.py", line 5, in <module> from M2Crypto import RSA ModuleNotFoundError: No module named 'M2Crypto
It seems that m2crypto gets not pulled-in by $(python_gen_any_dep 'dev-python/m2crypto[${PYTHON_USEDEP}]')
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01b374eee0434cadb2f8f27cb656395bebe94c35 commit 01b374eee0434cadb2f8f27cb656395bebe94c35 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2020-10-06 07:39:33 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2020-10-19 19:19:04 +0000 net-wireless/crda: EAPI=7, python3_9 Closes: https://bugs.gentoo.org/728666 Closes: https://bugs.gentoo.org/747085 Package-Manager: Portage-3.0.4, Repoman-3.0.1 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: Mike Gilbert <floppym@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/17817 net-wireless/crda/crda-4.14.ebuild | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)