tag 385470 patch thanks On Thu, Aug 31, 2006 at 04:44:34PM +0300, Niko Tyni wrote: > starting lphoto fails with > > /usr/bin/python: can't open file > '/usr/lib/python2.3/site-packages/Lphoto/lphoto.py': [Errno 2] No such file > or directory > > Starting with an explicit path to python 2.4 works fine: > > /usr/bin/python /usr/lib/python2.4/site-packages/Lphoto/lphoto.py
The problem is the totally broken /usr/bin/lphoto start script. The attached patch fixes it. I've also attached an NMU diff (along the way I fixed the build-depends line, which should read python-central >= 0.5, according to both, lintian and the python-central manual). Cheers, Christian Aichinger
diff -u lphoto-1.0.61/Lphoto/lphoto.py lphoto-1.0.61/Lphoto/lphoto.py --- lphoto-1.0.61/Lphoto/lphoto.py +++ lphoto-1.0.61/Lphoto/lphoto.py @@ -753,7 +753,7 @@ return KMainWindow.event(self, e) -if __name__ == "__main__": +def main(): global DesktopName, Program, Title, Version, Copyright, Url, BugEmail, Author, AuthorEmail about = KAboutData(DesktopName, Program, Version, Title, KAboutData.License_GPL,Copyright, "", Url, BugEmail) about.addAuthor(Author, "", AuthorEmail,"") @@ -774,0 +775,3 @@ + +if __name__ == "__main__": + main() --- lphoto-1.0.61.orig/lphoto +++ lphoto-1.0.61/lphoto @@ -1,3 +1,5 @@ -#!/bin/sh +#!/usr/bin/python -exec /usr/bin/python2.3 /usr/lib/python2.3/site-packages/Lphoto/lphoto.py $* +import Lphoto.lphoto + +Lphoto.lphoto.main()
diff -u lphoto-1.0.61/Lphoto/lphoto.py lphoto-1.0.61/Lphoto/lphoto.py --- lphoto-1.0.61/Lphoto/lphoto.py +++ lphoto-1.0.61/Lphoto/lphoto.py @@ -753,7 +753,7 @@ return KMainWindow.event(self, e) -if __name__ == "__main__": +def main(): global DesktopName, Program, Title, Version, Copyright, Url, BugEmail, Author, AuthorEmail about = KAboutData(DesktopName, Program, Version, Title, KAboutData.License_GPL,Copyright, "", Url, BugEmail) about.addAuthor(Author, "", AuthorEmail,"") @@ -774,0 +775,3 @@ + +if __name__ == "__main__": + main() diff -u lphoto-1.0.61/debian/control lphoto-1.0.61/debian/control --- lphoto-1.0.61/debian/control +++ lphoto-1.0.61/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Brian Thomason <[EMAIL PROTECTED]> Uploaders: Jaldhar H. Vyas <[EMAIL PROTECTED]> -Build-Depends: debhelper (>= 5.0.37.2), python-dev, python, python-central (>= 0.4.17) +Build-Depends: debhelper (>= 5.0.37.2), python-dev, python, python-central (>= 0.5) XS-Python-Version: all Standards-Version: 3.7.2 diff -u lphoto-1.0.61/debian/changelog lphoto-1.0.61/debian/changelog --- lphoto-1.0.61/debian/changelog +++ lphoto-1.0.61/debian/changelog @@ -1,3 +1,13 @@ +lphoto (1.0.61-2.1) unstable; urgency=low + + * Non-maintainer upload + * Rewrite startup script so it works with all python versions + (Closes: #385470) + * Bumped build-dep on python-central to >= 0.5 as suggested by lintian and + the python-central howto. + + -- Christian Aichinger <[EMAIL PROTECTED]> Wed, 4 Oct 2006 13:40:28 +0200 + lphoto (1.0.61-2) unstable; urgency=low * That should be python:Versions not Version (Closes: #378202) only in patch2: unchanged: --- lphoto-1.0.61.orig/lphoto +++ lphoto-1.0.61/lphoto @@ -1,3 +1,5 @@ -#!/bin/sh +#!/usr/bin/python -exec /usr/bin/python2.3 /usr/lib/python2.3/site-packages/Lphoto/lphoto.py $* +import Lphoto.lphoto + +Lphoto.lphoto.main()
signature.asc
Description: Digital signature