[Pkg-kde-extras] Bug#393049: Patch for #393049

Luis Rodrigo Gallardo Cruz rodrigo at nul-unu.com
Sat Nov 4 23:16:45 CET 2006


package unsermake
tag 393049 patch
thanks

Replace debian/patches/unsermake.diff by the attached patch, which
works by pointing the executable wrapper to the proper directory. This
patch also makes the package work even if default python version
changes and eliminates the useless setting of PYTHONPATH.


-------------- next part --------------
--- unsermake.orig	2006-11-04 15:56:25.000000000 -0600
+++ unsermake	2006-11-04 15:59:36.000000000 -0600
@@ -1,16 +1,9 @@
-#! /bin/sh
+#! /bin/bash
 
-self="$0"
-if test -L "$self"; then
-    try=`readlink $self 2>/dev/null` && self=$try
-fi
-mods=`dirname $self`
-directory=`dirname $mods`
-mod=`basename $mods`
-if test -n "$PYTHONPATH"; then
-   export PYTHONPATH=$directory:$PYTHONPATH
-else
-   export PYTHONPATH=$directory
-fi
-exec python -c "import $mod; $mod.main()" --modules $mods "$@"
+PYTHON=$(pyversions -d)
+
+mods=/var/lib/python-support/$PYTHON/unsermake
+mod=unsermake
+
+exec $PYTHON -c "import $mod; $mod.main()" --modules $mods "$@"
 


More information about the pkg-kde-extras mailing list