Changeset 542 for trunk


Ignore:
Timestamp:
12/15/2011 16:37:53 (5 months ago)
Author:
blee
Message:

Add new option CONF_EXPORT_INCREMENTAL_LN to allow incremental confexports
to use ln(1) rather than cp(1). This only works when temporary files and
CONF_EXPORT_FILE are on the same filesystem partition.

See #140

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/confman.conf.5.in

    r541 r542  
    114114.Xr confexport 8 run.  This option has no effect when using repository-style 
    115115exports. 
     116.It CONF_EXPORT_INCREMENTAL_LN 
     117This option further optimizes 
     118.Xr confexport 8 performance when using CONF_EXPORT_INCREMENTAL.  When enabled, 
     119.Xr confexport 8 will use 
     120.Xr ln 1 to copy unchanged exports into the new export rather than 
     121.Xr cp 1 .  This option can only be used if temporary files are created 
     122on the same filesystem partition as CONF_EXPORT_FILE. 
    116123.It CONF_FETCH_SSH_KEY 
    117124This is a private SSH keyfile for use with "sftp://" and "scp://" URIs above. 
  • trunk/confman.conf.in

    r541 r542  
    8181CONF_EXPORT_STYLE="repository" 
    8282CONF_EXPORT_INCREMENTAL="false" 
     83CONF_EXPORT_INCREMENTAL_LN="false" 
    8384EXPORT_REPO_PROTOCOL="" 
    8485EXPORT_REPO_HOSTNAME="" 
  • trunk/confmanlib.sh.in

    r532 r542  
    437437                    # This module was not changed, so preserve its old export 
    438438                    echo "Preserving old export for module: ${module}" 
    439                     cp -p "${CONF_EXPORT_FILE}/${module}.tgz" "${exportpath}" || return 1 
     439                    if ${CONF_EXPORT_INCREMENTAL_LN}; then 
     440                        ln "${CONF_EXPORT_FILE}/${module}.tgz" "${exportpath}" || return 1 
     441                    else 
     442                        cp -p "${CONF_EXPORT_FILE}/${module}.tgz" "${exportpath}" || return 1 
     443                    fi 
    440444                done 
    441445 
     
    491495                    # changed module, so preserve its old export 
    492496                    echo "Preserving old export for recipe: ${recipe}" 
    493                     cp -p "${CONF_EXPORT_FILE}/${recipe}.tgz" "${exportpath}" || return 1 
     497                    if ${CONF_EXPORT_INCREMENTAL_LN}; then 
     498                        ln "${CONF_EXPORT_FILE}/${recipe}.tgz" "${exportpath}" || return 1 
     499                    else 
     500                        cp -p "${CONF_EXPORT_FILE}/${recipe}.tgz" "${exportpath}" || return 1 
     501                    fi 
    494502                done 
    495503                conf_debug "updated_recipes: ${updated_recipes}" 
Note: See TracChangeset for help on using the changeset viewer.