mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
guix: Register garbage collector root for containers
By registering the container profiles as garbage collector roots, it will prevent `guix gc` from garbage collecting derivations which our container needs and inconvieniencing the user with a rebuild.
This commit is contained in:
parent
8f8b96fb54
commit
867a5e172a
2 changed files with 13 additions and 1 deletions
|
@ -207,7 +207,7 @@ time-machine() {
|
||||||
# Precious directories are those which should not be cleaned between successive
|
# Precious directories are those which should not be cleaned between successive
|
||||||
# guix builds
|
# guix builds
|
||||||
depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
|
depends_precious_dir_names='SOURCES_PATH BASE_CACHE SDK_PATH'
|
||||||
precious_dir_names="${depends_precious_dir_names} OUTDIR_BASE"
|
precious_dir_names="${depends_precious_dir_names} OUTDIR_BASE PROFILES_BASE"
|
||||||
|
|
||||||
# Usage: contains IFS-SEPARATED-LIST ITEM
|
# Usage: contains IFS-SEPARATED-LIST ITEM
|
||||||
contains() {
|
contains() {
|
||||||
|
@ -275,6 +275,14 @@ outdir_for_host() {
|
||||||
echo "${OUTDIR_BASE}/${1}"
|
echo "${OUTDIR_BASE}/${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Usage: profiledir_for_host HOST COMMAND
|
||||||
|
#
|
||||||
|
# HOST: The current platform triple we're building for
|
||||||
|
#
|
||||||
|
profiledir_for_host() {
|
||||||
|
echo "${PROFILES_BASE}/${2}-${1}"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#########
|
#########
|
||||||
# BUILD #
|
# BUILD #
|
||||||
|
@ -404,6 +412,7 @@ EOF
|
||||||
--keep-failed \
|
--keep-failed \
|
||||||
--fallback \
|
--fallback \
|
||||||
--link-profile \
|
--link-profile \
|
||||||
|
--root="$(profiledir_for_host "${HOST}" build)" \
|
||||||
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
|
${SUBSTITUTE_URLS:+--substitute-urls="$SUBSTITUTE_URLS"} \
|
||||||
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
|
${ADDITIONAL_GUIX_COMMON_FLAGS} ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \
|
||||||
-- env HOST="$host" \
|
-- env HOST="$host" \
|
||||||
|
|
|
@ -61,3 +61,6 @@ OUTDIR_BASE="${OUTDIR_BASE:-${VERSION_BASE}/output}"
|
||||||
|
|
||||||
var_base_basename="var"
|
var_base_basename="var"
|
||||||
VAR_BASE="${VAR_BASE:-${VERSION_BASE}/${var_base_basename}}"
|
VAR_BASE="${VAR_BASE:-${VERSION_BASE}/${var_base_basename}}"
|
||||||
|
|
||||||
|
profiles_base_basename="profiles"
|
||||||
|
PROFILES_BASE="${PROFILES_BASE:-${VAR_BASE}/${profiles_base_basename}}"
|
||||||
|
|
Loading…
Add table
Reference in a new issue