Commit f7a2d4d3 authored by Ophélie Gagnard's avatar Ophélie Gagnard

WIP: Support extends-cache

parent 979a58b2
......@@ -68,7 +68,7 @@ bin/buildout buildout:newest=true -v
# build locally everything with gcc to get download-cache and extends-cache ready
echo "Finally running buildout for the local compilation..."
cp "$TARBALL_DIR"/30local_buildout.cfg buildout.cfg
bin/buildout buildout:newest=true -v
bin/buildout buildout:newest=true -v -c buildout.cfg
### Fix the go/ directory.
......
......@@ -22,10 +22,12 @@ copy_and_solve_templates "$DISTRIB_FILES_SOFTWARE_DIR" "$OBS_DIR"
# ARCHIVES FILES
### Finalize the tarball directory preparation
# delete the buildout directory, as the extends-cache extension caches the useful buildout files
rm -rf "$BUILDOUT_DIR"
# switch to the buildout wrapper for OBS
cp "$TARBALL_DIR"/40obs_buildout.cfg "$RUN_BUILDOUT_DIR"/buildout.cfg
# save the local $TARBALL_DIR path so that it is replaced by the $TARBALL_DIR path from OBS' VM
echo "$TARBALL_DIR" > "$TARBALL_DIR"/local_tarball_directory_path
echo "$BUILD_DIR" > "$TARBALL_DIR"/local_build_directory_path
# add a stamp so that OBS does not clean the local preparation before compiling
touch "$TARBALL_DIR/clean-stamp"
# copy required eggs that are not cached
......
......@@ -7,5 +7,5 @@ BUILD_DIR="$TARBALL_DIR"/build
INSTALL_DIR="$DESTDIR""$TARGET_DIR"
RUN_BUILDOUT_DIR="$BUILD_DIR""$TARGET_DIR"
# get the path of the BUILD_DIR of the first build (performed to prepare the cache for OBS)
OLD_TARBALL_DIR="$(cat local_tarball_directory_path)"
OLD_BUILD_DIR="$(cat local_build_directory_path)"
SLAPOS_BOOTSTRAP_SYSTEM_PYTHON=$(which python2.7 2> /dev/null || echo python3)
[buildout]
rootdir = %TARGET_DIR%
destdir = %BUILD_DIR%
builddir = %RUN_BUILDOUT_DIR%
extends =
file://%BUILDOUT_ENTRY_POINT%
versions = versions
extends-cache = extends-cache
download-cache = download-cache
newest = false
[versions]
setuptools = %SETUPTOOLS_VERSION%
zc.buildout = %ZC_BUILDOUT_VERSION%
zc.recipe.egg = %ZC_RECIPE_EGG_VERSION%
[buildout]
rootdir = %TARGET_DIR%
destdir = %BUILD_DIR%
builddir = %RUN_BUILDOUT_DIR%
extends =
file://%BUILDOUT_ENTRY_POINT%
versions = versions
extends-cache = extends-cache
download-cache = download-cache
install-from-cache = true
[versions]
setuptools = %SETUPTOOLS_VERSION%
zc.buildout = %ZC_BUILDOUT_VERSION%
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment