Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435462 - net-analyzer/nmap should not depend unconditionally on dev-lang/python-2*
Summary: net-analyzer/nmap should not depend unconditionally on dev-lang/python-2*
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-18 23:24 UTC by Alexander Zubkov
Modified: 2013-01-26 17:19 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 Alexander Zubkov 2012-09-18 23:24:37 UTC
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.
Comment 1 Sergey Popov gentoo-dev 2012-10-02 14:17:21 UTC
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...
Comment 2 Anton Bolshakov 2012-11-11 03:02:02 UTC
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.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-01 16:48:06 UTC
Fixed in 6.01.
Comment 4 Alexander Zubkov 2012-12-01 19:07:18 UTC
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
--------------------------------------------------------------
Comment 5 Anton Bolshakov 2012-12-01 21:52:50 UTC
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
Comment 6 Anton Bolshakov 2012-12-02 04:31:27 UTC
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
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-26 16:26:50 UTC
I'll test your changes with 6.0.1 and 6.25.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-26 16:35:51 UTC
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.
Comment 9 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-26 16:40:50 UTC
python.eclass maintainers, please explain how PYTHON_DEPEND can be set to differentiate not one but two USE flag conditionals.
Comment 10 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-26 16:47:52 UTC
On second thoughts, I don't think we need PYTHON_DEPEND at all - the deps are set explicitly anyway.
Comment 11 Rick Farina (Zero_Chaos) gentoo-dev 2013-01-26 16:54:49 UTC
(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.
Comment 12 Mike Gilbert gentoo-dev 2013-01-26 17:06:38 UTC
(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.
Comment 13 Jeroen Roovers (RETIRED) gentoo-dev 2013-01-26 17:19:34 UTC
--- 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).
+