Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 267379 - app-admin/eselect-python: dev-lang/python:2.6 stage1 build makes wrong symlink
Summary: app-admin/eselect-python: dev-lang/python:2.6 stage1 build makes wrong symlink
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2009-04-24 20:59 UTC by Csaba Tóth
Modified: 2011-02-16 23:07 UTC (History)
1 user (show)

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


Attachments
patch for /usr/share/eselect/modules/python.eselect (python.eselect.patch,1.28 KB, patch)
2009-04-29 16:43 UTC, Csaba Tóth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Tóth 2009-04-24 20:59:39 UTC
When i make a stage1 build with catalyst, in the image tarball the /usr/bin/python file points to /tmp/stage1root/usr/bin/python2.6 This is wrong, it seems this command ends with broken symlinks:

ROOT="/tmp/stage1root" emerge =python-2.6.2

It failed with python-2.6.1* also, but this worked with python-2.5* !

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-04-25 15:10:47 UTC
Please post your `emerge --info' and attach the build log that ends up producing the bad symlink.


Also, it's not a blocker.
Comment 2 Csaba Tóth 2009-04-26 08:57:25 UTC
As i mentioned, the problem is the symlink handling change in the ebuilds.

In python-2.5.4.ebuild:

pkg_postinst() {
        local myroot
        myroot=$(echo $ROOT | sed 's:/$::')
        local mansuffix=$(ecompress --suffix)

        python_makesym
        alternatives_auto_makesym "/usr/bin/idle" "idle[0-9].[0-9]"
        alternatives_auto_makesym "/usr/bin/pydoc" "pydoc[0-9].[0-9]"
        alternatives_auto_makesym "/usr/bin/python-config" \
                                                                "python-config-[0-9].[0-9]"


and in the python.eclass:

# @FUNCTION: python_makesym
# @DESCRIPTION:
# Run without arguments, it will create the /usr/bin/python symlinks
# to the latest installed version
python_makesym() {
        alternatives_auto_makesym "/usr/bin/python" "python[0-9].[0-9]"
        alternatives_auto_makesym "/usr/bin/python2" "python2.[0-9]"
}



But in the python-2.6.2.ebuild:

pkg_postinst() {
        eselect python update --ignore 3.0
        python_version

        python_mod_optimize -x "(site-packages|test)" \
                                                /usr/$(get_libdir)/python${PYVER}
}


So, the 2.5.4's ebuild uses the methods in python.eclass, but the 2.6.2's ebuild uses the eselect. But eselect didnt know anythng about the ROOT environment variable.

And i think this is a blocking, as i cannot make gentoo stage1 images..
Comment 3 Csaba Tóth 2009-04-29 16:43:04 UTC
Created attachment 189870 [details, diff]
patch for /usr/share/eselect/modules/python.eselect

patch for /usr/share/eselect/modules/python.eselect

this fixes the symlinker ln commands arguments, just as the way it did in binutils.eselect, and in others.
Comment 4 Csaba Tóth 2009-04-29 16:45:41 UTC
Attached a patch what fixes this bug.
Please use this with eselect-python (as i saw, the original developer hawking retired..).
Comment 5 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2009-05-02 20:58:22 UTC
I have no idea why I was CC'ed on this bug. In case I'm needed or have something to do, please CC me back.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-23 18:09:57 UTC
This bug should be fixed in trunk of eselect-python.
Comment 7 Csaba Tóth 2009-05-24 00:25:18 UTC
Ok, i looked for the trunk version of eselect-python (i didnt know there is another repo for this), and it is fixed yes. But when will be this in portage? Portage have this bug, so i reopened the bug report.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-05-24 01:59:33 UTC
I'm in python@gentoo.org alias, so you don't need to CC me.

(In reply to comment #7)
> But when will be this in portage?

Soon...
Comment 9 Matt Turner gentoo-dev 2011-02-16 23:00:27 UTC
I'm getting this bug in my stage1 builds. I've masked out python-3, so python-2.7.1 is the only version being installed. It doesn't seem like the logic should be so tricky for choosing where the python symlink should be pointing. :)
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-16 23:07:50 UTC
(In reply to comment #9)

It's unrelated, different, known problem.