Changeset 412


Ignore:
Timestamp:
09/17/2009 21:45:43 (3 years ago)
Author:
ccowart
Message:

Merging fixes from trunk for several issues.

Fixes #49, #53, #61, #47, #48

Location:
branches/confman-1.9
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/confman-1.9

  • branches/confman-1.9/conflock.in

    r329 r412  
    3737 
    3838    if [ -z "$lockfile" ] ; then 
    39         echo "No lock file specified in conflock.sh" >&2; exit 2; 
     39        echo "No lock file specified in conflock" >&2; exit 2; 
     40    fi 
     41 
     42    if ! [ -d `dirname "$lockfile"` ] ; then 
     43        echo "Lock file directory does not exist" >&2; exit 2; 
    4044    fi 
    4145 
     
    7175 
    7276    if [ -z "$lockfile" ] ; then 
    73         echo "No lock file specified in conflock.sh" >&2; exit 2; 
     77        echo "No lock file specified in conflock" >&2; exit 2; 
    7478    fi 
    7579 
     
    9296 
    9397    if [ -z "$lockfile" ] ; then 
    94         echo "No lock file specified in conflock.sh" >&2; exit 2; 
     98        echo "No lock file specified in conflock" >&2; exit 2; 
    9599    fi 
    96100 
     
    109113    unlock)     unlock "$@";; 
    110114    haslock)    haslock "$@";; 
    111     *)      echo "Unknown argument to conflock.sh: $1" >&2; exit 2;; 
     115    *)      echo "Unknown argument to conflock: $1" >&2; exit 2;; 
    112116esac 
    113117 
  • branches/confman-1.9/confmancommon.sh.in

    r397 r412  
    8080    stat_opts="mode=%Mp%Lp owner=%Su group=%Sg" 
    8181    readlink_cmd="@GREADLINK@" 
    82     fetch_cmd="fetch -q -o" 
    8382    ;; 
    8483    Linux) 
     
    9089    stat_opts="mode=%a owner=%U group=%G" 
    9190    readlink_cmd="readlink" 
    92     fetch_cmd="@WGET@ -q -O" 
    9391    ;; 
    9492    *) 
     
    10098    stat_opts="mode=%Mp%Lp owner=%Su group=%Sg" 
    10199    readlink_cmd="@GREADLINK@" 
    102     fetch_cmd="fetch -q -o" 
    103100    ;; 
    104101esac 
     102 
     103# Things that don't vary by OS 
     104fetch_cmd="@WGET@ -q -O" 
    105105 
    106106# Get the user config 
  • branches/confman-1.9/confmanlib.sh.in

    r395 r412  
    9898 
    9999function conf_lock_wcopy { 
     100    conf_require_wcopy 
    100101    ${LOCK} lock $$ $(conf_wcopy_lockfile) || exit 1 
    101102    WCOPY_DIRTY="true" 
     
    275276            modules=$(ls -1 ${WORK_PATH} | egrep -v '^(\.svn|checkpoints)$') # until ticket $40 is resolved 
    276277            for module in $modules; do 
    277                 tar -czf "$exportpath/$module.tgz" -C "${WORK_PATH}" $module 
     278                tar -hczf "$exportpath/$module.tgz" -C "${WORK_PATH}" $module 
    278279            done 
    279280            ;; 
     
    281282            for recipefile in $(conf_recipe_dir)/*; do 
    282283                modules="meta $(conf_get_recipe $recipefile)" 
    283                 tar -czf "$exportpath/${recipefile#$(conf_recipe_dir)/}.tgz" -C "${WORK_PATH}" $modules 
     284                tar -hczf "$exportpath/${recipefile#$(conf_recipe_dir)/}.tgz" -C "${WORK_PATH}" $modules 
    284285            done 
    285286            ;; 
     
    308309        # This is a hack to work around NFS home dirs, for now: 
    309310        ${NFS_HACK:-false} && chmod o+rx ${WORK_PATH} 
     311 
     312    # Test to see if the SVN working copy is out of date 
     313    if ! @SVN@ info $moduledir >/dev/null ; then 
     314        echo "Error: $moduledir isn't usable by svn." >&2 
     315        exit 1 
     316    fi 
    310317 
    311318        for directory in `find -L $moduledir -mindepth 1 -type d | grep -v "\.svn"`; 
     
    681688        # Now, we have to go fix all the confman headers in all the files... 
    682689        find ${WORK_PATH}/${newmod} -type f -not -path '*/.svn/*' -exec \ 
    683                 gsed -i -r "s/^(# Managed under )${oldmod}( module)/\1${newmod}\2/" \ 
    684                 {} \; 
     690                ${sed_cmd} -i -r \ 
     691        "s/^(# Managed under )${oldmod}( module)/\1${newmod}\2/" {} \; 
    685692         
    686693        @SVN@ update ${WORK_PATH} || \ 
     
    942949} 
    943950 
     951function conf_require_wcopy { 
     952    if ! [ -d "${WORK_PATH}" ] ; then 
     953        echo "Error: this action requires that your working copy exist." >&2 
     954        echo 'Please see `confman help setup` for more information.' >&2 
     955        exit 1 
     956    fi 
     957} 
     958 
    944959function conf_tmp_file { 
    945960    local file=$(${mktemp_file}) || return 1 
Note: See TracChangeset for help on using the changeset viewer.