I have discovered an issue that affects multiple ebuilds
Analyzing the causes of why nmap gives an error when it is updated
and at the same time the python version is changed, it generates
an error that setuptool cannot find
x86_64-pc-linux-gnu-g++ -c -DNOLUA
-I./libdnet-stripped/include -I./nbase -I./nsock/include
-DHAVE_CONFIG_H -DNMAP_PLATFORM=\"x86_64-pc-linux-gnu\"
-DNMAPDATADIR=\"/usr/share/nmap\" -O2 -pipe -march=native
-fomit-frame-pointer -Wall -fno-strict-aliasing utils.cc -o
utils.o
x86_64-pc-linux-gnu-g++ -c -DNOLUA -I./libdnet-stripped/include
-I./nbase -I./nsock/include -DHAVE_CONFIG_H
-DNMAP_PLATFORM=\"x86_64-pc-linux-gnu\"
-DNMAPDATADIR=\"/usr/share/nmap\" -O2 -pipe -march=native
-fomit-frame-pointer -Wall -fno-strict-aliasing xml.cc -o
xml.o
x86_64-pc-linux-gnu-g++ -c -DNOLUA -I./libdnet-stripped/include
-I./nbase -I./nsock/include -DHAVE_CONFIG_H
-DNMAP_PLATFORM=\"x86_64-pc-linux-gnu\"
-DNMAPDATADIR=\"/usr/share/nmap\" -O2 -pipe -march=native
-fomit-frame-pointer -Wall -fno-strict-aliasing main.cc -o
main.o
cd ndiff && /usr/bin/python3.12 setup.py build
Traceback (most recent call last):
File
"/var/tmp/portage/net-analyzer/nmap-7.95/work/nmap-7.95/ndiff/setup.py",
line 11, in <module>
import setuptools.command.install
ModuleNotFoundError: No module named 'setuptools'
make: *** [Makefile:381: build-ndiff] Error 1
make: *** Waiting for unfinished jobs....
* ERROR: net-analyzer/nmap-7.95::gentoo failed (compile phase):
* emake failed
*
* If you need support, post the output of `emerge --info
'=net-analyzer/nmap-7.95::gentoo'`,
* the complete build log and the output of `emerge -pqv
'=net-analyzer/nmap-7.95::gentoo'`.
* The complete build log is located at
'/var/tmp/portage/net-analyzer/nmap-7.95/temp/build.log'.
* The ebuild environment file is located at
'/var/tmp/portage/net-analyzer/nmap-7.95/temp/environment'.
* Working directory:
'/var/tmp/portage/net-analyzer/nmap-7.95/work/nmap-7.95'
* S: '/var/tmp/portage/net-analyzer/nmap-7.95/work/nmap-7.95'
Inspecting both the ebuild and the distutils-r1 eclass I see that
within this eclass you can modify RDEPEND , BDEPEND, DEPEND,
REQUIRED_USE and IUSE, then when viewing the nmap ebuild, I see
that BDEPEND is directly modified without preserving all the
previous values, attached nmap code
BDEPEND="
${PYTHON_DEPS}
virtual/pkgconfig
nls? ( sys-devel/gettext )
zenmap? ( ${DISTUTILS_DEPS} )
"
Seeing this problem, you should always use the variables RDEPEND,
BDEPEND, DEPEND, adding content, not replacing it (of course,
there may be a special case), but as a general rule you should
add, not replace, these variables, both in eclass and ebuilds.
It would have to be added instead of replacing using BDEPEND+=
RDEPEND+= DEPEND+=
-- new nmap.ebuild --
IUSE+=" ipv6 libssh2 ncat ndiff nping nls
+nse ssl symlink zenmap"
REQUIRED_USE+="
nse? ( ${LUA_REQUIRED_USE} )
symlink? ( ncat )
"
RDEPEND+="
dev-libs/liblinear:=
dev-libs/libpcre2
net-libs/libpcap
ndiff? ( ${PYTHON_DEPS} )
libssh2? (
net-libs/libssh2[zlib]
sys-libs/zlib
)
nls? ( virtual/libintl )
nse? (
${LUA_DEPS}
sys-libs/zlib
)
ssl? ( dev-libs/openssl:= )
symlink? (
ncat? (
!net-analyzer/netcat
!net-analyzer/openbsd-netcat
)
)
zenmap? (
${PYTHON_DEPS}
$(python_gen_cond_dep '
dev-python/pygobject:3[${PYTHON_USEDEP}]
')
)
"
DEPEND+=" ${RDEPEND}"
# Python is always needed at build time for some scripts
BDEPEND+="
virtual/pkgconfig
nls? ( sys-devel/gettext )
zenmap? ( ${DISTUTILS_DEPS} )
"
I removed ${PYTHON_DEPS} because it is inherited from distutils-r1