diff --git a/config/companion_libs.in b/config/companion_libs.in index 4ad1fdd8..a1f21e94 100644 --- a/config/companion_libs.in +++ b/config/companion_libs.in @@ -73,6 +73,11 @@ if COMPLIBS comment "Companion libraries common options" +config COMPLIBS_BACKUP + bool + default y + depends on ! COMPLIBS_SHARED + config COMPLIBS_CHECK bool prompt "Check the companion libraries builds (!!! READ HELP!!!)" diff --git a/scripts/functions b/scripts/functions index fe2b93f4..a5e124c7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -1017,9 +1017,7 @@ CT_DoSaveState() { /^(UID|EUID)=/d; /^(FUNCNAME|GROUPS|PPID|SHELLOPTS)=/d;' >"${state_dir}/env.sh" - if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then - # If complibs are not shared, then COMPLIBS_DIR == PREFIX_DIR, - # so do not save. + if [ "${CT_COMPLIBS_BACKUP}" = "y" ]; then CT_DoTarballIfExists "${CT_COMPLIBS_DIR}" "${state_dir}/complibs_dir" fi CT_DoTarballIfExists "${CT_CONFIG_DIR}" "${state_dir}/config_dir" @@ -1060,9 +1058,7 @@ CT_DoLoadState(){ CT_DoExtractTarballIfExists "${state_dir}/cc_core_shared_prefix_dir" "${CT_CC_CORE_SHARED_PREFIX_DIR}" CT_DoExtractTarballIfExists "${state_dir}/cc_core_static_prefix_dir" "${CT_CC_CORE_STATIC_PREFIX_DIR}" CT_DoExtractTarballIfExists "${state_dir}/config_dir" "${CT_CONFIG_DIR}" - if [ "${CT_COMPLIBS_SHARED}" != "y" ]; then - # If complibs are not shared, then COMPLIBS_DIR == PREFIX_DIR, - # so do not restore. + if [ "${CT_COMPLIBS_BACKUP}" = "y" ]; then CT_DoExtractTarballIfExists "${state_dir}/complibs_dir" "${CT_COMPLIBS_DIR}" fi