FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 12-01-2010, 07:10 PM
Sebastian Pipping
 
Default Stable Python stage repair thread

Hello,


the proposed changes have been applied to all ebuilds of dev-lang/python
in Gentoo's main tree as of now.
So it's in CVS now, mirrors take longer.


If you stumble upon problems with it please
- file bugs with details
- reply here, pointing to the bug


NOTE: If you plan to explicitly unmerge an older version of Python,
you still may experience auto-updates of the active Python
version do to calls to eselect_python_update() from pkg_postrm()
of older ebuilds. Details follow.


To be sure you can use this command:

# fgrep -A 8 'eselect_python_update()'
/var/db/pkg/dev-lang/python-*/python-*.ebuild

You may either find nothing or one of these variants:


A) The troublemaker doing updates

eselect_python_update() {
local eselect_python_options
[[ "$(eselect python show)" == "python2."* ]]
&& eselect_python_options="--python2"

# Create python2 symlink.
eselect python update --python2 > /dev/null

eselect python update ${eselect_python_options}
}

B) Its harmless successor

eselect_python_update() {
if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
eselect python update --python${PV%%.*}
fi
}


To fully solve this remaining problem we will have to touch
eselect-python.

Best,



Sebastian
 
Old 12-03-2010, 09:22 AM
Sebastian Pipping
 
Default Stable Python stage repair thread

Sadly, it's not done yet.

Please collect related bugs into this tracker:
https://bugs.gentoo.org/show_bug.cgi?id=347639



Sebastian
 
Old 12-03-2010, 11:34 PM
Sebastian Pipping
 
Default Stable Python stage repair thread

Hello!


In the mean time I have sent the attached patch to people involved with
building Gentoo stages. Before further taking action on/with that patch
I am waiting for their response.

I am now posting it here in order to let you know about this change in
status and to give potentially interested parties a chance to join with
review.

Best,



Sebastian
Index: python-2.7.1.ebuild
================================================== =================
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-2.7.1.ebuild,v
retrieving revision 1.3
diff -u -r1.3 python-2.7.1.ebuild
--- python-2.7.1.ebuild 1 Dec 2010 19:53:20 -0000 1.3
+++ python-2.7.1.ebuild 3 Dec 2010 13:43:05 -0000
@@ -356,10 +356,35 @@
fi
}

-ensure_python_symlink() {
- if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
- eselect python update --python${PV%%.*}
- fi
+repair_python_integration() {
+ case "$1" in
+ pkg_postinst)
+ # Ensure active python on our line (either 2.x or 3.x)
+ # If unset, use us
+ if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python set --python${PV%%.*} python${SLOT} || die
+ fi
+
+ # Ensure two symlinks are in place
+ for symlink in ${EROOT%/}/usr/bin/python{,${PV%%.*}}; do
+ [[ -f "${symlink}" ]] && continue
+ einfo "Creating symlink: ${symlink}"
+ ln -s python-wrapper "${symlink}" || die
+ done
+ ;;
+
+ pkg_postrm)
+ # Ensure active python on our line (either 2.x or 3.x)
+ # If unset, use latest
+ if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
+ eselect python update --python${PV%%.*} --if-unset || die
+ fi
+ ;;
+
+ *)
+ die 'unsupported usage of repair_python_integration()'
+ ;;
+ esac
}

pkg_preinst() {
@@ -372,7 +397,7 @@

pkg_postinst() {
restore_active_python_version
- ensure_python_symlink
+ repair_python_integration ${FUNCNAME}

python_mod_optimize -f -x "/(site-packages|test|tests)/" $(python_get_libdir)

@@ -390,7 +415,7 @@
}

pkg_postrm() {
- ensure_python_symlink
+ repair_python_integration ${FUNCNAME}

python_mod_cleanup $(python_get_libdir)
}
 
Old 12-04-2010, 12:47 AM
"Jorge Manuel B. S. Vicetto"
 
Default Stable Python stage repair thread

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

On 03-12-2010 23:34, Sebastian Pipping wrote:
> Hello!
>
>
> In the mean time I have sent the attached patch to people involved with
> building Gentoo stages. Before further taking action on/with that patch
> I am waiting for their response.

I've been talking with Sebastian to see if we can get a fix that works
for releng, so we can get stages building working again.

> I am now posting it here in order to let you know about this change in
> status and to give potentially interested parties a chance to join with
> review.

I've sent Sebastian the following patch that I've tested locally and
that allowed me to build stages again.


diff -u -b -B -r1.10 python-2.6.5-r3.ebuild
- --- python-2.6.5-r3.ebuild 1 Dec 2010 19:53:20 -0000 1.10
+++ python-2.6.5-r3.ebuild 4 Dec 2010 01:44:13 -0000
@@ -299,6 +299,7 @@
if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
eselect python update --python${PV%%.*}
fi
+ eselect python update --if-unset
}

pkg_preinst() {
Index: python-3.1.2-r4.ebuild
================================================== =================
RCS file: /var/cvsroot/gentoo-x86/dev-lang/python/python-3.1.2-r4.ebuild,v
retrieving revision 1.11
diff -u -b -B -r1.11 python-3.1.2-r4.ebuild
- --- python-3.1.2-r4.ebuild 1 Dec 2010 19:53:20 -0000 1.11
+++ python-3.1.2-r4.ebuild 4 Dec 2010 01:44:13 -0000
@@ -297,6 +297,7 @@
if [[ -z "$(eselect python show --python${PV%%.*})" ]]; then
eselect python update --python${PV%%.*}
fi
+ eselect python update --if-unset
}

pkg_preinst() {


This patch gives us back the python symlink and sets python-2.6 as the
default python interpreter.


> Best,


> Sebastian

- --
Regards,

Jorge Vicetto (jmbsvicetto) - jmbsvicetto at gentoo dot org
Gentoo- forums / Userrel / Devrel / KDE / Elections / RelEng
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJM+Z2kAAoJEC8ZTXQF1qEPIgwP/0hbKtUma2XbnJzB0uawdXwe
QQTrrnaLq82ErQYTBDyG63Pb1kscTbeH8LwqeSsDpIRkCcXwFE eC+Imr738e3uZh
e9ihYvFGCdD97z0YvkAkYuqVqGGP5im3KBHSnNSMk6ZwXJtD03 vgeVwRA5Dnx7jg
KgMWj5WEdevAaH9VP59dpTRjSvhyMKHPEPjrcJjZ01RFu/QNSqvvVpVXB80oJCLn
A4nneBjBJhIWEFYR2plriw56I2XsTg++M6LkSaVKDUOBbBkIVa DARAvlBzwcaVXp
uIndguJjaXOp1Nl/GACsuvsc2Dd0GOkCbeDv2NAynzYBiOT6ldwq64NMa87JrNVa
BcMQilvsovw3qsupR2rmR3Ylss1Q26lAN5lbqyMsfbLTVO4DZT cy4Fr/ktieMojt
SngC/TBIOUwUApWrCYUNFHqqMM0jpWVtqa0RPaAj6FkNjYoWOTgfYxK mwJPz1Dj0
jY5zR0lwHaaSCkoi6KbA1XWo1/db5o7wbGomb7B5bRY4HbXUI8cXU/zBaZElkR2y
Jf0j30NvWtTM6Eh8V7T15hFku900BjmmMjvmrNMwrajA5U3DsL RVW/spLNx12yeL
xyErfH32WuiW/hmLCgnmGrGmcYnQeN6fBO0ENCM0kDWCYW5b4qmkoqug0v3G1Re V
ZgE5fXFR/eS67bhUir/2
=jEfM
-----END PGP SIGNATURE-----
 
Old 12-04-2010, 07:19 AM
Torsten Veller
 
Default Stable Python stage repair thread

* Sebastian Pipping <sping@gentoo.org>:
> +repair_python_integration() {
> + case "$1" in
> + pkg_postinst)

You could also use EBUILD_PHASE.
http://dev.gentoo.org/~tanderson/pms/eapi-2-approved/pms.html#TBL-11-41-2
 

Thread Tools




All times are GMT. The time now is 10:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org