Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 148833 - x11-misc/alacarte-0.10.1 ignores python 2.5 even if it's installed
Summary: x11-misc/alacarte-0.10.1 ignores python 2.5 even if it's installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: http://bugzilla.gnome.org/show_bug.cg...
Whiteboard:
Keywords:
: 156164 185296 (view as bug list)
Depends on:
Blocks: python-2.5
  Show dependency tree
 
Reported: 2006-09-23 12:57 UTC by Mike Auty (RETIRED)
Modified: 2007-07-18 15:30 UTC (History)
9 users (show)

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


Attachments
Filthy ebuild with a dirty sed in it as an example fix (alacarte-0.10.0.ebuild,817 bytes, text/plain)
2006-09-23 13:18 UTC, Mike Auty (RETIRED)
Details
alacarte ebuild for python 2.5 (alacarte-0.10.1.ebuild,952 bytes, text/plain)
2006-11-01 13:01 UTC, Jimmy.Jazz
Details
alacarte-python-2.5.patch (alacarte-python-2.5.patch,1.01 KB, text/plain)
2006-11-14 05:15 UTC, Alastair Tse (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2006-09-23 12:57:08 UTC
Ok, so the error message is:

checking for python2.4... /usr/bin/python2.4
checking whether /usr/bin/python2.4 version is >= 2.4.0... yes
checking for  version... 2.4
checking for  platform... linux2
checking for  script directory... ${prefix}/lib/python2.4/site-packages
checking for  extension module directory... ${exec_prefix}/lib/python2.4/site-packages
checking for i686-pc-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for ALACARTE... yes
checking for pygtk 2.8.0 installed for python 2.4... not found
configure: error: required pygtk version not found

It turns out that since it's detecting the python version as 2.4 (even though both 2.4 and 2.5 are installed), it then can't find pygtk because python-updater has recompiled that against 2.5 rather than 2.4.

It appears it's checking for python 2.4 first because of the line:

AM_PATH_PYTHON_VERSION(2.4, 2.4.0)

The quickest fix seems to be to change this to:

AM_PATH_PYTHON_VERSION(2.5, 2.5.0, 2.4, 2.4.0)
Comment 1 Mike Auty (RETIRED) gentoo-dev 2006-09-23 13:18:18 UTC
Created attachment 97889 [details]
Filthy ebuild with a dirty sed in it as an example fix
Comment 2 Mike Auty (RETIRED) gentoo-dev 2006-09-23 13:19:34 UTC
Doh, sorry, I'm guessing this is probably a gnome issue.  Sorry!
Comment 3 Alastair Tse (RETIRED) gentoo-dev 2006-09-24 17:13:34 UTC
err, why is the dep on this ebuild virtual/python-2.4 ? it should be dev-lang/python-2.4
Comment 4 Mike Auty (RETIRED) gentoo-dev 2006-09-24 21:50:38 UTC
The dep on my ebuild should be the same as the original alacarte one, I just copied it to make the fix.  The reason it's on the original, I've no idea (maybe it works with jython?).
Comment 5 Mike Auty (RETIRED) gentoo-dev 2006-10-08 04:09:55 UTC
Just updated the summary, since this is also the case with the recently added version of alacarte.  If you completely uninstall python-2.4, you'll see:

checking for xgettext... /usr/bin/xgettext
checking for python2.4... no
configure: error: no suitable Python interpreter found

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/alacarte-0.10.1/work/alacarte-0.10.1/config.log

!!! ERROR: x11-misc/alacarte-0.10.1 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  ebuild.sh, line 1255:   Called gnome2_src_compile
  gnome2.eclass, line 63:   Called gnome2_src_configure
  gnome2.eclass, line 59:   Called econf '--disable-gtk-doc'
  ebuild.sh, line 540:   Called die

!!! econf failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

I'm ccing the python team back in, just incase they can shed some light on the best way of patching this...
Comment 6 Saleem Abdulrasool (RETIRED) gentoo-dev 2006-10-16 01:32:04 UTC
It deps on virtual/python because stackless python can be used as a python provider
Comment 7 Mike Auty (RETIRED) gentoo-dev 2006-10-16 01:57:19 UTC
Either way, this ebuild still technically requires =python-2.4 rather than >=python-2.4, because the checks in the configure script won't allow it to use 2.5.

Ideally some form of patch that fixes this limitation should be applied.  My question is whether it should be a simple sed fix like the one I've provided above, or whether it should be a more complex patch that doesn't limit the python version at all (I've seen other ebuilds that can correctly detect and make use of either 2.4 or 2.5).  If so, I'm going to need some help writing it because I don't know my way around automake, sadly...
Comment 8 Cédric Schaff 2006-10-21 06:46:47 UTC
(In reply to comment #1)
> Created an attachment (id=97889) [edit]
> Filthy ebuild with a dirty sed in it as an example fix
> 

This is just for newb like me who will not understand directly, there is a little error at the end of the modified ebuild:
just replace eautoreconf by autoreconf -> worked in my case for alacarte-0.10.1

By the way, thank you for this patch ...
Comment 9 Alex 2006-10-21 09:25:07 UTC
Cedric, eautoreconf is a wrapper function of autoreconf in gentoo.
Comment 10 Charlie Shepherd (RETIRED) gentoo-dev 2006-10-21 09:28:53 UTC
(In reply to comment #9)
> Cedric, eautoreconf is a wrapper function of autoreconf in gentoo.

Err, from http://www.gentoo.org/proj/en/qa/autofailure.xml:

This function does not wrap around the broken autoreconf script, but rather analyse the autotools support files present and run the tools in their right order.
Comment 11 Alex 2006-10-21 09:32:54 UTC
It's a wrapper in the fact that it is not a direct call and thus calls it in a different manor.
Comment 12 Jimmy.Jazz 2006-11-01 13:01:28 UTC
Created attachment 100997 [details]
alacarte ebuild for python 2.5

Hi,

a modified alacarte ebuild with a less dirty sed :)

Jj
Comment 13 Alastair Tse (RETIRED) gentoo-dev 2006-11-14 05:15:31 UTC
Created attachment 101912 [details]
alacarte-python-2.5.patch

A patch against the latest ebuild to be python2.5 compatible
Comment 14 Luis Medinas (RETIRED) gentoo-dev 2006-11-14 18:26:23 UTC
i added a patch to our ebuild and i opened a bug to upstream that changes the configure.in script. I think this is a better approach for this bug.

Thanks all.
Comment 15 Mike Auty (RETIRED) gentoo-dev 2006-11-15 11:04:06 UTC
Luis, thanks for including the patch.  Unfortunately the ordering causes autotools to determine there is a python interpreter and then assume that it's 2.4 (which it then fails to find).  In the original comment I put 2.5 first, but I have no idea whether this builds on a 2.4 only system.  It seems the problem isn't quite gone...

checking for python2.4... no
configure: error: no suitable Python interpreter found

!!! Please attach the following file when filing a report to bugs.gentoo.org:
!!! /var/tmp/portage/x11-misc/alacarte-0.10.1-r1/work/alacarte-0.10.1/config.log

!!! ERROR: x11-misc/alacarte-0.10.1-r1 failed.
Call stack:
  ebuild.sh, line 1568:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  ebuild.sh, line 1261:   Called gnome2_src_compile
  gnome2.eclass, line 63:   Called gnome2_src_configure
  gnome2.eclass, line 59:   Called econf '--disable-gtk-doc'
  ebuild.sh, line 540:   Called die
Comment 16 Jimmy.Jazz 2006-11-15 11:26:32 UTC
(In reply to comment #15)

> checking for python2.4... no
> configure: error: no suitable Python interpreter found

Hi,

Please read comment #12, it is more generic and will work with other versions of python to come.

Jj





Comment 17 Jimmy.Jazz 2006-11-15 11:28:24 UTC
(In reply to comment #15)

or just add autoconf to the ebuild ;)
Comment 18 Luis Medinas (RETIRED) gentoo-dev 2006-11-15 11:43:49 UTC
(In reply to comment #17)
> (In reply to comment #15)
> 
> or just add autoconf to the ebuild ;)
> 

autoreconf added to the ebuild to fix the issue.
Thanks
Comment 19 horatio 2006-11-24 16:33:42 UTC
(In reply to comment #18)
> 
> autoreconf added to the ebuild to fix the issue.
> 

The ebuild still ignores Python 2.5 if there's a Python 2.4 to be had. And if python-updater has shifted pygtk to 2.5's site-packages, alacarte still breaks.

So /alacarte-0.10.1-python25.patch should have 

   +AM_PATH_PYTHON_VERSION(2.5, 2.5.0, 2.4, 2.4.0)

instead of 

   +AM_PATH_PYTHON_VERSION(2.4, 2.4.0, 2.5, 2.5.0)

That change made, it works.
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-11-25 04:57:28 UTC
*** Bug 156164 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2006-11-25 04:58:14 UTC
Reopen 
Comment 22 Frank Lomax 2006-12-12 15:10:54 UTC
I just tried to do a massive emerge -uDN world and got bit by this same error, however I don't have python 2.5 emerged in (don't know why, I just don't).  /usr/bin/python is 2.4.3 -- specifically 2.4.3-r4

Do I need to emerge in python 2.5 in order to finish my updates?
Comment 23 Mike Auty (RETIRED) gentoo-dev 2006-12-12 15:15:44 UTC
Frank, as far as I'm aware, python-2.5 is masked, and there's no need to upgrade to it.  Quite why you're having difficulty if you've just got python-2.4 installed is a bit of a mystery.  This bug should really only affect you if you've got python-2.5 installed.  The only thing I can suggest is checking your error messages very carefully and also seeing if you've got python-2.3 installed at all.  If you do, make sure you run python-updater and then you should be able to uninstall python-2.3 with something like "emerge -C '<python-2.4'".  Hope that helps...  5:)
Comment 24 Frank Lomax 2006-12-12 15:23:15 UTC
Thanks for the quick response Mike!  I did indeed have python 2.3 installed, so I did as you suggested (ran python-updater then emerge -C <python-2.4).  Unfortunately that didn't help:

checking for pygtk 2.8.0 installed for python 2.4... not found
configure: error: required pygtk version not found

It's true, I have pygtk 2.10 installed.  I had to do that because pygtk was blocking pygobject, so I uninstalled pygtk then did my massive emerge -uDN world.  I'm guessing that installed pygtk 2.10, but it looks like alacarte isn't too happy with pygtk 2.10.

Any other suggestions or any other information I can provide?
Comment 25 Mike Auty (RETIRED) gentoo-dev 2006-12-12 15:27:55 UTC
Hiya, first off, check that you really do have pygtk installed.  I know it sounds obvious, but portage may not have got the dependency tracking quite right, and you might not actually have pygtk installed yet if you uninstalled it to get past the blockage.

Pygtk-2.10 works fine with alacarte (I've been using it for a while), but if you've got it installed and are still having trouble then please attach your config.log from the working directory (it should be mentioned at the end of the failed emerge).  It should be something like /var/tmp/portage/x11-misc/alacarte-0.10.1/work/alacarte-0.10.1/config.log.  We can then take a look through it and see whether it's simply not finding python properly (which is our problem here) or whether there is an issue with pygtk...  5:)
Comment 26 Frank Lomax 2006-12-12 16:07:14 UTC
Mike, I figured out the problem, thanks to your hint about the config.log file.  Turns out I have a /usr/local/bin/python2.4 which I'd installed from Python svn.  Even though as root /usr/bin/python is first on my path, apparently alacarte's configure will believe /usr/local/bin/python2.4 if it exists. :(  Note that I did not have a /usr/local/bin/python though.

I moved /usr/local/bin/python2.4{,.aside} (and did the same with python2.3 just to be safe), and alacarte now installed fine.

Probably should make sure configure doesn't use /usr/local/bin if possible.

Again, thanks for your help.
Comment 27 Luis Medinas (RETIRED) gentoo-dev 2007-02-25 23:47:29 UTC
alacarte 0.10.2 is on cvs with our fix. 
We can close this bug now.
Comment 28 ruckc 2007-04-18 05:06:18 UTC
Please reopen, i just tried to emerge gnome and i failed with this error.  x11-misc/alacarte-0.10.2

I have python-2.5 emerged and i have recently synced.

Comment 29 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-04-18 14:47:46 UTC
Try running python-updater.  If the detected version of python is not the one that pygtk (and probably gnome-menus) was built against, then it will fail.
Comment 30 ruckc 2007-04-18 20:00:53 UTC
(In reply to comment #29)
> Try running python-updater.  If the detected version of python is not the one
> that pygtk (and probably gnome-menus) was built against, then it will fail.
> 

I have ran python-updater.  I then reran emerge gnome-menus pygtk and then retried emerging alacarte, still failure.

Comment 31 Miika Linnapuomi 2007-05-01 17:46:58 UTC
Fails for me too:

checking for pygtk 2.8.0 installed for python 2.4... not found
configure: error: required pygtk version not found

I had python2.4, installed 2.5, ran python-updater and this is the only package that fails. Temporarily moving /usr/bin/python2.4 is the dirty 'fix', but the configure script should preferably check for pygtk for either 2.4 or 2.5, or be lazy and check the way it does now (failing if not found for first python), but first for 2.5.
Comment 32 Jakub Moc (RETIRED) gentoo-dev 2007-07-14 15:07:30 UTC
*** Bug 185296 has been marked as a duplicate of this bug. ***
Comment 33 Santiago M. Mola (RETIRED) gentoo-dev 2007-07-18 15:30:46 UTC
@ruck, Miika: you need to use the latest (testing) alacarte-0.11.3-r1.
Python 2.5 is not stable, so don't except that stable packages are always fixed for it.