0.7.x fails to start python scripts on ArchLinux

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
jinkstjb
Newbie
Newbie
Posts: 2
Joined: December 11th, 2011, 12:13 pm

0.7.x fails to start python scripts on ArchLinux

Post by jinkstjb »

Hi,
the following commit breaks starting python scrips on ArchLinux:

Code: Select all

commit c735e1da89035987261cc1ce6d058b4180a70dfd
Author: ShyPike <shypike@sabnzbd.org>
Date:   Fri Nov 4 22:21:36 2011 +0100

    Always run Python user scripts, despite not being "executable".
The problem is, that this commit prefixes "python" to every script ending in .py and at least on ArchLinux /usr/bin/python points to Python3 while the Python2 executable resides under /usr/bin/python2. Reverting the commit (obviously) fixes the issue.
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: 0.7.x fails to start python scripts on ArchLinux

Post by sander »

FWIW: no problem with 07x git version on Ubuntu; on Ubuntu, 'python' points to python2. See below.

Code: Select all


sander@R540:~$ python
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

sander@R540:~$ python3
Python 3.2 (r32:88445, Mar 25 2011, 19:56:22) 
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
sander@R540:~$

User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: 0.7.x fails to start python scripts on ArchLinux

Post by shypike »

Should be fixed now.
For scripts without the X-bit, the default Python will still be used.
Scripts with the X-bit, will be sent straight to the OS (like before).
jinkstjb
Newbie
Newbie
Posts: 2
Joined: December 11th, 2011, 12:13 pm

Re: 0.7.x fails to start python scripts on ArchLinux

Post by jinkstjb »

Should be fixed now.
Thanks! That solution looks like a great idea.
FWIW: no problem with 07x git version on Ubuntu; on Ubuntu, 'python' points to python2. See below.
Yeah, Arch is pretty much alone on this one for now. Being bleeding edge, the Arch devs made a judgment call to set Python 3 to be the default implementation sometime around the 3.1 release. It mostly works well and the provided distribution packages take this into account, but every now and then we get to annoy upstream devs with being different. ;)
Post Reply