mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:49:01 +02:00
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>
This commit is contained in:
parent
df76a64d95
commit
94ff843006
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user