nmap ebuild contains reference to python eclass, which forces it to depend always on python (version 2 because of PYTHON_DEPEND="2"). But I think it needs python only with "gtk" USE-flag.
No, some other console utilities in nmap package(at least in 5.51 and 5.51.6 versions) are depends on python 2. Still not sure about Nmap 6, will check later...
I'm second on that. nmap needs python2 with gtk (zen) and ndiff flags only. I hacked the ebuild, installed nmap 6.01 without python2 on my server. So far, everything works fine.
Fixed in 6.01.
No, it is not fixed. python dependency in nmap-6.01.ebuild is still unconditional. -------------------------------------------------------------- # emerge -vp '=nmap-6.01' These are the packages that would be merged, in order: Calculating dependencies... done! [binary N ] dev-lang/lua-5.1.4-r8 USE="deprecated readline -emacs -static" 283 kB [binary N ] dev-libs/apr-1.4.5 USE="urandom uuid -doc -older-kernels-compatibility -static-libs" 204 kB [binary NS ] dev-lang/python-2.7.3-r2 [3.2.3] USE="gdbm ipv6 ncurses readline ssl threads (wide-unicode) xml -berkdb -build -doc -examples -sqlite -tk -wininst" 6,794 kB [ebuild N ~] net-analyzer/nmap-6.01 USE="lua ssl -gtk -ncat -ndiff -nmap-update -nping" 21,133 kB Total: 4 packages (3 new, 1 in new slot, 3 binaries), Size of downloads: 28,412 kB --------------------------------------------------------------
I was playing with the solution and tried to fix it in pentoo overlay: http://code.google.com/p/pentoo/source/browse/portage/trunk/net-analyzer/nmap/nmap-6.25.ebuild?spec=svn3945&r=3945 The trick is to add PYTHON_DEPEND="python? 2" See if it helps
I've synced it with the gentoo's ebuild, see the latest http://code.google.com/p/pentoo/source/browse/portage/trunk/net-analyzer/nmap/nmap-6.25.ebuild An another point to make, the "include" patch is not required any more: epatch "${FILESDIR}"/${PN}-4.75-include.patch
I'll test your changes with 6.0.1 and 6.25.
We need to set PYTHON_DEPEND according to USE=ndiff/zenmap - a special USE=python should not be required. Currently we don't even have USE=zenmap, so that should be added as well.
python.eclass maintainers, please explain how PYTHON_DEPEND can be set to differentiate not one but two USE flag conditionals.
On second thoughts, I don't think we need PYTHON_DEPEND at all - the deps are set explicitly anyway.
(In reply to comment #9) > python.eclass maintainers, please explain how PYTHON_DEPEND can be set to > differentiate not one but two USE flag conditionals. I can't do that in any approved EAPI, that's why USE=python was introduced.
(In reply to comment #10) > On second thoughts, I don't think we need PYTHON_DEPEND at all - the deps > are set explicitly anyway. Correct. Just manage your own python dependency and remove PYTHON_DEPEND altogether. I do note that you call python_set_active_version 2 in pkg_setup, which would imply that you need python2 at some point in the build process. If you remove PYTHON_DEPEND and do not depend on python2 unconditionally, you should confirm that the build system does not utilize python when the gtk and ndiff use flags are disabled.
--- ChangeLog 2013-01-26 17:56:08.558222423 +0100 +++ ChangeLog.new 2013-01-26 18:18:07.074451545 +0100 @@ -2,6 +2,10 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nmap/ChangeLog,v 1.282 2013/01/18 14:58:04 polynomial-c Exp $ + 26 Jan 2013; Jeroen Roovers <jer@gentoo.org> nmap-6.01.ebuild, + nmap-6.25.ebuild: + Drop PYTHON_DEPEND and -4.75-include.patch by Alexander Zubkov (bug #435462). +