Changeset 526
- Timestamp:
- 08/14/2011 17:41:50 (9 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
confexport.in (modified) (2 diffs)
-
confmanlib.sh.in (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confexport.in
r525 r526 101 101 conf_checkout_tree 102 102 103 export_revision=$(conf_revision) 104 sys_ revision=$(conf_export_sysrev)103 repo_export="${CONF_EXPORT_STYLE}:$(conf_revision)" 104 sys_export="$(conf_export_sysrev)" 105 105 106 conf_debug " export_revision is ${export_revision}"107 conf_debug "sys_ revision is ${sys_revision}"106 conf_debug "repo_export: ${repo_export}" 107 conf_debug "sys_export: ${sys_export}" 108 108 109 if [ "${sys_revision}" -gt "${export_revision}" ]; then 110 echo "Error: The last export was newer than the current repository. Exiting without making changes." >&2 111 conf_cleanExit 1 112 elif [ "${sys_revision}" -eq "${export_revision}" ]; then 109 if [ "${sys_export}" = "${repo_export}" ]; then 113 110 if ! ${FORCE}; then 114 111 echo "System is up to date." | conf_logger … … 117 114 fi 118 115 119 if ! conf_export "${temp_conf_export}" "${sys_revision}" "${export_revision}"; then 116 repo_method=$(echo ${repo_export} | cut -d ':' -f 1) 117 sys_method=$(echo ${sys_export} | cut -d ':' -f 1) 118 repo_revision=$(echo ${repo_export} | cut -d ':' -f 2) 119 sys_revision=$(echo ${sys_export} | cut -d ':' -f 2) 120 121 if [ "${sys_method}" != "${repo_method}" ]; then 122 echo "Export style change detected: ${sys_method} -> ${repo_method}" 123 if ${CONF_EXPORT_INCREMENTAL}; then 124 echo "Ignoring CONF_EXPORT_INCREMENTAL during export style change" 125 CONF_EXPORT_INCREMENTAL="false" 126 fi 127 fi 128 129 if [ "${sys_revision}" -gt "${repo_revision}" ]; then 130 echo "Error: The last export was newer than the current repository. Exiting without making changes." >&2 131 conf_cleanExit 1 132 fi 133 134 if ! conf_export "${temp_conf_export}" "${sys_revision}" "${repo_revision}"; then 120 135 echo "Error: The export failed. Exiting." >&2 121 136 rm -rf "${temp_conf_export}" -
trunk/confmanlib.sh.in
r525 r526 1100 1100 local rv 1101 1101 1102 export_sysrev= 01102 export_sysrev="none:0" 1103 1103 rv=0 1104 1104 … … 1106 1106 if ! export_sysrev=$(cat "${EXPORT_REV_FILE}"); then 1107 1107 echo "Could not read file: ${EXPORT_REV_FILE}" >&2 1108 export_sysrev= 01108 export_sysrev="none:0" 1109 1109 rv=1 1110 1110 fi 1111 1111 fi 1112 1112 1113 echo ${export_sysrev}1113 echo "${export_sysrev}" 1114 1114 return ${rv} 1115 1115 } … … 1135 1135 local revision=$(conf_revision) 1136 1136 1137 if ! echo "${ revision}" > "${EXPORT_REV_FILE}"; then1137 if ! echo "${CONF_EXPORT_STYLE}:${revision}" > "${EXPORT_REV_FILE}"; then 1138 1138 echo "Could not record export to file: ${EXPORT_REV_FILE}" >&2 1139 1139 return 1
Note: See TracChangeset
for help on using the changeset viewer.
