aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-06 18:00:30 +0000
committerPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-06 18:08:05 +0000
commit94ff843006fede275148a545e7011f21bf6c73cb (patch)
tree1ad3cc79b1589a82409a2cd6206b6ab1493f0109 /layerindex/update.py
parentdf76a64d951318db0a608c8bfca8407cded1276a (diff)
downloadopenembedded-core-contrib-94ff843006fede275148a545e7011f21bf6c73cb.tar.gz
update.py: ensure script can be run from any directory
Don't assume the current directory contains our conf/local.conf, explicitly use the directory above where the script is located. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex/update.py')
-rwxr-xr-xlayerindex/update.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/layerindex/update.py b/layerindex/update.py
index 8df34d9c26..f4bda9825c 100755
--- a/layerindex/update.py
+++ b/layerindex/update.py
@@ -268,7 +268,10 @@ def main():
core_layerdir = os.path.join(core_repodir, core_layer.vcs_subdir)
out = runcmd("git checkout origin/%s" % options.branch, core_repodir)
out = runcmd("git clean -f -x", core_repodir)
- os.environ['BBPATH'] = str("%s:%s" % (os.path.realpath('.'), core_layerdir))
+ # The directory above where this script exists should contain our conf/layer.conf,
+ # so add it to BBPATH along with the core layer directory
+ confparentdir = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
+ os.environ['BBPATH'] = str("%s:%s" % (confparentdir, core_layerdir))
# Change into a temporary directory so we don't write the cache and other files to the current dir
if not os.path.exists(settings.TEMP_BASE_DIR):