Changeset 567
- Timestamp:
- 12/16/2011 18:25:56 (5 months ago)
- Location:
- branches/confman-1.9
- Files:
-
- 4 edited
-
. (modified) (1 prop)
-
confman.conf.5.in (modified) (1 diff)
-
confman.conf.in (modified) (1 diff)
-
confman.in (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/confman-1.9
-
branches/confman-1.9/confman.conf.5.in
r565 r567 213 213 .Cm confman update 214 214 will update only the recipe-relevant files when given no additional arguments. 215 .It CONF_COMMIT_REPO_ONLY 216 Defaults to "false". Set it to "true" to change the behavior of 217 .Xr confman 8 218 "commit" to a repository-only operation, with no regard for the current 219 machine's recipe or the subsequent rollout to the filesystem. This is 220 useful in centrally managed confexport/confsync environments. 215 221 .El 216 222 .Sh AUTHORS -
branches/confman-1.9/confman.conf.in
r565 r567 110 110 UPDATE_RELEVANT_ONLY="false" 111 111 112 # In centrally managed confexport/confsync environments, the expected 113 # behavior of a "confman commit" is a repository-only operation, with 114 # with no regard for the current machine's recipe or the subsequent 115 # rollout to the filesystem. 116 CONF_COMMIT_REPO_ONLY="false" -
branches/confman-1.9/confman.in
r566 r567 197 197 cd "$WORK_PATH" 198 198 until [ -z "$1" ] ; do 199 @SVN@ status "${1#${ABS_WORK}/}" >> "$status"199 @SVN@ status "${1#${ABS_WORK}/}" | egrep -v "^\?" >> "$status" 200 200 shift 201 201 done … … 211 211 } 212 212 213 function commit { 213 function commit_repo_only { 214 local msg status abswork 215 local opt OPTIND OPTARG 216 local wcopy_lock 217 218 wcopy_lock=$(conf_lock_wcopy) 219 abswork=$(conf_abswork) 220 221 while getopts ":m:F:" opt ; do 222 case $opt in 223 m) LOG_MESSAGE="$OPTARG"; LOG_MESSAGE_SET="true" ;; 224 F) LOG_FILE="$OPTARG" ;; 225 *) echo "Invalid option '-${OPTARG}'." >&4 226 print_usage 1 227 ;; 228 esac 229 done 230 shift $(($OPTIND - 1)) 231 232 [ -z "$1" ] || print_usage 1 233 234 if status=$(get_status "${abswork}"); then 235 nocommit=false 236 msg=$(get_log "$status") || conf_cleanExit 237 rm -f "$status" 238 fi 239 240 echo "Commit operation started" >&2 241 242 $nocommit || conf_commit_file $msg "${abswork}" || return $? 243 244 echo "Commit operation finished successfully" >&2 245 246 rm -f $msg 247 conf_unlock_wcopy $wcopy_lock 248 } 249 250 function commit_full { 214 251 local msg status modules module symlink abswork files 215 252 local nocommit=true … … 274 311 conf_unlock_wcopy $wcopy_lock 275 312 conf_unlock_system $system_lock 313 } 314 315 function commit { 316 if ${CONF_COMMIT_REPO_ONLY}; then 317 commit_repo_only "$@" || return $? 318 else 319 commit_full "$@" || return $? 320 fi 276 321 } 277 322
Note: See TracChangeset
for help on using the changeset viewer.
