From c65503846b3c51c6adc653710b02fdbeb6396d0e Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 9 Nov 2011 17:19:10 +0100 Subject: [PATCH] correct pathes --- kernel_build.py | 2 +- kernel_inpbuilder.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel_build.py b/kernel_build.py index 24024ad..30db504 100644 --- a/kernel_build.py +++ b/kernel_build.py @@ -63,7 +63,7 @@ def build_kernel_with_pbuilder(revision, pbuilder_script, dist='stable'): '--git-branch-name', '%s' %(GIT_BRANCH_NAME), '--revision', '%s' %(revision), '--dist', '%s' %(dist), - '--overlay-dir', '%s' % os.path.join(CWD,'kernel-package-overlay'), + '--overlay-dir', '%s' % os.path.join(sys.path[0],'kernel-package-overlay'), ] os.environ.update({'DIST': '%s' %(dist)}) diff --git a/kernel_inpbuilder.py b/kernel_inpbuilder.py index efe1297..4116f62 100644 --- a/kernel_inpbuilder.py +++ b/kernel_inpbuilder.py @@ -352,8 +352,8 @@ if __name__ == '__main__': OVERLAY_DIR = options.overlay_dir or '/usr/share/kernel-package' - # add current dir to python search path - cmd_folder = os.path.join(os.path.abspath(OVERLAY_DIR), '..') + # add directory where current script is in to python search path + cmd_folder = sys.path[0] sys.path.insert(0, cmd_folder) os.environ['WORKSPACE']=cmd_folder # needed by kernel_persistence import kernel_persistence -- 2.39.5