Bastian Blank
2006-Aug-22 11:35 UTC
[Pkg-xen-changes] r263 - trunk/xen-unstable/debian/patches
Author: waldi Date: Tue Aug 22 11:35:03 2006 New Revision: 263 Added: trunk/xen-unstable/debian/patches/prefix-python.dpatch (contents, props changed) Modified: trunk/xen-unstable/debian/patches/00list Log: * debian/patches/00list: Add prefix-python. * debian/patches/prefix-python.dpatch: Add. Modified: trunk/xen-unstable/debian/patches/00list =============================================================================--- trunk/xen-unstable/debian/patches/00list (original) +++ trunk/xen-unstable/debian/patches/00list Tue Aug 22 11:35:03 2006 @@ -1,5 +1,6 @@ prefix-utils prefix-ioemu +prefix-python version qemu-config libs Added: trunk/xen-unstable/debian/patches/prefix-python.dpatch =============================================================================--- (empty file) +++ trunk/xen-unstable/debian/patches/prefix-python.dpatch Tue Aug 22 11:35:03 2006 @@ -0,0 +1,65 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## prefix-tools-python.dpatch by Bastian Blank <waldi@debian.org> +## +## All lines beginning with `## DP:'' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad xen-unstable~/tools/misc/xend xen-unstable/tools/misc/xend +--- xen-unstable~/tools/misc/xend 2006-08-22 09:56:46.000000000 +0000 ++++ xen-unstable/tools/misc/xend 2006-08-22 11:29:33.980558849 +0000 +@@ -35,16 +35,7 @@ + + AUXBIN = ''xen/util/auxbin.py'' + +-for p in [''python%s'' % sys.version[:3], ''python'']: +- for l in [''/usr/lib64'', ''/usr/lib'']: +- d = os.path.join(l, p) +- if os.path.exists(os.path.join(d, AUXBIN)): +- sys.path.append(d) +- import xen.util.auxbin +- libpath = xen.util.auxbin.libpath() +- sys.path = sys.path[:-1] +- sys.path.append(libpath) +- break ++sys.path.append(''%s/../lib/python'' % sys.path[0]) + + from xen.xend.server import SrvDaemon + +@@ -84,18 +75,18 @@ + + def start_xenstored(): + XENSTORED_TRACE = os.getenv("XENSTORED_TRACE") +- cmd = "xenstored --pid-file /var/run/xenstore.pid" ++ cmd = sys.path[0] + "/xenstored --pid-file /var/run/xenstore.pid" + if XENSTORED_TRACE: + cmd += " -T /var/log/xenstored-trace.log" + s,o = commands.getstatusoutput(cmd) + + def start_consoled(): + if os.fork() == 0: +- os.execvp(''xenconsoled'', [''xenconsoled'']) ++ os.execvp(sys.path[0] + ''/xenconsoled'', [''xenconsoled'']) + + def start_blktapctrl(): + if os.fork() == 0: +- os.execvp(''blktapctrl'', [''blktapctrl'']) ++ os.execvp(sys.path[0] + ''/blktapctrl'', [''blktapctrl'']) + + def main(): + try: +diff -urNad xen-unstable~/tools/misc/xm xen-unstable/tools/misc/xm +--- xen-unstable~/tools/misc/xm 2006-08-22 09:56:46.000000000 +0000 ++++ xen-unstable/tools/misc/xm 2006-08-22 11:28:55.692955234 +0000 +@@ -1,10 +1,7 @@ + #!/usr/bin/env python + # -*- mode: python; -*- + import sys +- +-# add fallback path for non-native python path installs if needed +-sys.path.append(''/usr/lib/python'') +-sys.path.append(''/usr/lib64/python'') ++sys.path.append(''%s/../lib/python'' % sys.path[0]) + from xen.xm import main + + main.main(sys.argv)