Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 298843 - media-sound/jack-3.0.0 and 3.1.1: Bytecompilation fails with Python 2.6
Summary: media-sound/jack-3.0.0 and 3.1.1: Bytecompilation fails with Python 2.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
: 321907 (view as bug list)
Depends on:
Blocks: python-2.6
  Show dependency tree
 
Reported: 2009-12-29 10:31 UTC by Martin Dummer
Modified: 2010-06-17 22:14 UTC (History)
3 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 Martin Dummer 2009-12-29 10:31:10 UTC
jack aborts/crashed after invoking

Reproducible: Always

Steps to Reproduce:
1. start jack with or without parameter


Actual Results:  
martin@bln8890n ~ $ jack
Traceback (most recent call last):
  File "/usr/bin/jack", line 42, in <module>
    import jack_argv
  File "/usr/lib64/python2.6/site-packages/jack_argv.py", line 22, in <module>
    import jack_utils
  File "/usr/lib64/python2.6/site-packages/jack_utils.py", line 26, in <module>
    import jack_functions
  File "/usr/lib64/python2.6/site-packages/jack_functions.py", line 222
    def starts_with(str, with):
                            ^
SyntaxError: invalid syntax
martin@bln8890n ~ $




Expected Results:  
start ripping audio cd

It seems that in the function "starts_with" in file "jack_functions.py" the parameter "with" is a reserved word now. The parameter name has to be changed to something different. The patch below fixes this bug.



--- /usr/lib64/python2.6/site-packages/jack_functions.py.old    2009-12-29 11:27:39.592792803 +0100
+++ /usr/lib64/python2.6/site-packages/jack_functions.py        2009-12-29 11:28:08.285813990 +0100
@@ -219,9 +219,9 @@
     ff = blocks % CDDA_BLOCKS_PER_SECOND
     return mm, ss, ff, blocks

-def starts_with(str, with):
-    "checks whether str starts with with"
-    return str[0:len(with)] == with
+def starts_with(str, withstr):
+    "checks whether str starts with withstr"
+    return str[0:len(withstr)] == withstr

 ## #XXX the following will be used if all references to it have been updated.
 ## meanwhile the wrapper below is used.
Comment 1 Ryan Harris 2010-06-05 14:26:40 UTC
I can confirm the same bug and that the patch fixes it
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-06-05 16:56:02 UTC
*** Bug 321907 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Pipping gentoo-dev 2010-06-17 22:14:34 UTC
Thanks martin, should be fixed.  Please re-emerge with jack-3.(0.0|1.1)-r1.

+*jack-3.1.1-r1 (17 Jun 2010)
+*jack-3.0.0-r1 (17 Jun 2010)
+
+  17 Jun 2010; Sebastian Pipping <sping@gentoo.org> +jack-3.0.0-r1.ebuild,
+  +files/jack-3.0.0-python26.patch, +jack-3.1.1-r1.ebuild:
+  Fix Python 2.6 issue on keyword "with". Thanks for the patch to Martin
+  Dummer
+