# HG changeset patch # User "Yann E. MORIN" # Date 1286140246 -7200 # Node ID b46ecc90d3ab7a3981bbd8d0dfcb6b9f53334587 # Parent 4009fc9c47d5d2c4e7765f1e9fb6721a87217ae5 complibs: better deduce whether to backup complibs or not To decide whether we need to backup the companion libraries, do not rely on the !shared case. In the future other cases may require not to save the companion libraries (eg. if using the ones provided by the host distro). Signed-off-by: "Yann E. MORIN" diff -r 4009fc9c47d5 -r b46ecc90d3ab config/companion_libs.in --- a/config/companion_libs.in Mon Oct 04 00:16:56 2010 +0200 +++ b/config/companion_libs.in Sun Oct 03 23:10:46 2010 +0200 @@ -73,6 +73,11 @@ 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 -r 4009fc9c47d5 -r b46ecc90d3ab scripts/functions --- a/scripts/functions Mon Oct 04 00:16:56 2010 +0200 +++ b/scripts/functions Sun Oct 03 23:10:46 2010 +0200 @@ -1017,9 +1017,7 @@ /^(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_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