Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447052 - PYTHON_DEPEND with emerge --root= should use build environment's python
Summary: PYTHON_DEPEND with emerge --root= should use build environment's python
Status: RESOLVED DUPLICATE of bug 323311
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 22:55 UTC by NWallette
Modified: 2012-12-13 17:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (info.txt,4.16 KB, text/plain)
2012-12-12 22:55 UTC, NWallette
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NWallette 2012-12-12 22:55:36 UTC
Created attachment 332178 [details]
emerge --info

I'm trying to build a minimal Gentoo system small enough to run on CF cards.  I'm using Portage's "emerge --root=/mnt/tiny" syntax to accomplish this.  Unfortunately, for the common case where an ebuild uses python to accomplish build-time tasks, the "PYTHON_DEPEND" line causes Portage to require python as a dependency in the target environment.  I.e., python becomes an RDEPEND rather than a DEPEND.

On a normal system, this is no big deal since you'll have python anyway.  But on a minimal system with no Portage and dev environments, this ends up requiring (e.g.) python 2.x, which requires Portage, which requires python 3.x, and eselect-python, and pax-utils, and sandbox, etc. etc.  This is all completely unnecessary for the package itself to run once compiled, and should be satisfied by the build environment instead.

I'll admit out of the gate that I'm not a Portage expert, so it's possible I'm doing something wrong.  I've done some research to try and avoid making noise in the bugtracker, but I think this is a legitimate oversight in the way Portage treats PYTHON_DEPEND, especially considering the corner case of ROOT not being "/".

I've tried ugly hacks to "resolve" this for my build, so I've lost track of all the packages I've seen this on, but two examples are:

x11-proto/xcb-proto-1.8 (fixable by commenting the python dependency)
dev-libs/gobject-introspection-1.32.1 (hack caught by Portage's sanity checks)

Attached: emerge --info
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-13 16:03:41 UTC

*** This bug has been marked as a duplicate of bug 323311 ***
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-12-13 17:38:10 UTC
I wouldn't call python exactly a build-time dependency for xcbproto. I'm not sure if xcbgen is used anywhere, but installing its Python modules makes it a run-time dependency per Gentoo rules.