Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 541178 - net-print/hplip-3.15.2 should depend on net-print/cups without [${PYTHON_USEDEP}]
Summary: net-print/hplip-3.15.2 should depend on net-print/cups without [${PYTHON_USED...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-23 21:16 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2015-03-08 09:55 UTC (History)
3 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 Arfrever Frehtes Taifersar Arahesis 2015-02-23 21:16:23 UTC
net-print/hplip-3.15.2 should depend on net-print/cups without [${PYTHON_USEDEP}].

Python version optionally supported by net-print/cups is unrelated to Python version (non-optionally) used by net-print/hplip.
Comment 1 Daniel Pielmeier gentoo-dev 2015-02-24 13:48:25 UTC
You may have a point here, but I think the documentation is ambiguous here or I don't understand it correctly. I hope the python team can clarify this.

It says:
All dependencies on other Python packages need to carry the value of PYTHON_USEDEP as a USE dependency.[1]

What are python packages, everything in dev-python, all packages using the python eclasses, all with a python USE flag?

It furthermore says:
It must be used on package dependencies which are using the python-r1 eclass.[2]

So when is PYTHON_USEDEP required? Only for dependencies using the python-r1 eclass, or for all python-*r1 eclasses?

Below just for your information the dependencies of hplip whichuse any of the above mentioned eclasses:

dev-python/dbus-python python-r1
dev-python/notify-python python-r1
dev-python/pygobject python-r1
dev-python/PyQt4 python-r1
virtual/python-imaging python-r1

dev-python/reportlab distutils-r1
net-analyzer/net-snmp distutils-r1

net-print/cups python-single-r1

[1] http://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#Metadata_variables
[2] http://wiki.gentoo.org/wiki/Project:Python/python-r1#PYTHON_USEDEP
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-02-24 15:23:03 UTC
Daniel, PYTHON_USEDEP is used to enforce a match between Python versions/implementations used from dependencies. You need it only when you use the Python modules provided by dependent package.
Comment 3 Jonathan Callen (RETIRED) gentoo-dev 2015-03-01 01:52:22 UTC
The rule is if you actually depend on running the Python code from a package from within the same Python instance as the Python code the current package (here hplip) is using, then (and only then) you MUST use the ${PYTHON_USEDEP} dependency.  If you are only using the package for its installed executables in /usr/bin, compiled C/C++/etc. libraries in /usr/$(get_libdir), etc., then you need not use the ${PYTHON_USEDEP} at all.

In this case, unless I'm mistaken, hplip does not care what version of python net-print/cups and net-analyzer/net-snmp optionally support, as it doesn't use that part of the code at all.  If it did, then it would *also* need to depend on USE=python on each of those packages.
Comment 4 Daniel Pielmeier gentoo-dev 2015-03-08 09:55:09 UTC
+  08 Mar 2015; Daniel Pielmeier <billie@gentoo.org> hplip-3.15.2.ebuild:
+  Remove PYTHON_USEDEP from net-print/cups and net-analyzer/net-snmp. Thanks to
+  Arfrever Frehtes Taifersar Arahesis for the report and the gentoo python team
+  for the detailed explanation.

I took a closer look and it seems that hplip does not use python modules from cups and net-snmp. Thank you all for your help.