Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 319651 - python.eclass: validate_PYTHON_ABIS() should check if dev-lang/python is installed
Summary: python.eclass: validate_PYTHON_ABIS() should check if dev-lang/python is inst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: High blocker (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 04:08 UTC by Robin Johnson
Modified: 2010-05-17 18:02 UTC (History)
2 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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2010-05-14 04:08:24 UTC
During stage building, there are times when $ROOT does NOT contain any Python binary.

dev-libs/libxml2-2.7.7 exhibited this problem, where the call was:
 python_execute_function -f -q econf ${myconf}

Since there is no Python installed, iterated_PYTHON_ABIS is completely empty, and the arguments given are NEVER called.

Additionally, since it never entered the loop, it returns successfully, when it clearly should not.

Additional caveats:
- Due to stage building requirements, we CANNOT bring in dev-lang/python at this phase. So do NOT add it to non-conditional DEPEND of any ebuild/eclass.

Changes requested:
1. Check if the iterated_PYTHON_ABIS is empty before attempting to iterate it. die if this is the case.
2. Everywhere that you are fixing calls by just adding python_execute_function in front, consider what happens if Python is NOT available or desired.

I fixed libxml by changing it to:
+ if use python; then
 python_execute_function -f -q econf ${myconf}
+ else
+ econf ${myconf}
+ fi
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-05-14 04:48:52 UTC
FYI: We already ran into this for bug 317891
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-17 18:02:51 UTC
Fixed.