Ignore:
Timestamp:
11/11/2009 14:21:33 (3 years ago)
Author:
ccowart
Message:

Merging fix for regression on installing directories from trunk.

Resolves #86

Location:
branches/confman-1.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/confman-1.9

    • Property svn:mergeinfo changed
      /trunkmerged: 466
  • branches/confman-1.9/confman.in

    r483 r484  
    189189 
    190190function commit { 
    191     local msg status modules module modpath 
     191    local msg status modules module symlink symlinks 
    192192    local nocommit=true 
    193193    local opt OPTIND OPTARG 
     
    211211    wcopy_lock=$(conf_lock_wcopy) 
    212212     
    213     for module in $(conf_get_recipe) ; do 
    214         modpath=$(${readlink_cmd} -m ${WORK_PATH}/${module}) 
    215         modules=${modules:+${modules} }${modpath} 
     213    for module in $(conf_get_recipe); do 
     214        modules=${modules:+${modules} }${module} 
     215        for symlink in $(find ${WORK_PATH}/${module} \ 
     216            -type l -exec ${readlink_cmd} -m {} \; -print) 
     217        do 
     218            symlink=$(conf_rel_path "${symlink}") 
     219            symlinks="${symlinks:+${symlinks} }${symlink}" 
     220        done 
    216221    done 
    217222     
     
    219224    conf_update_tree || conf_cleanExit 
    220225     
    221     if status=$(get_status $modules) ; then 
     226    if status=$(get_status $modules $symlinks); then 
    222227        nocommit=false 
    223228        msg=$(get_log "$status") || conf_cleanExit 
     
    228233     
    229234    echo "Commit operation started" >&2 
    230     $nocommit || conf_commit "$(conf_get_recipe)" $msg || return $? 
     235    $nocommit || conf_commit_file $msg $modules $symlinks || return $? 
    231236    for layer in $(conf_get_recipe) ; do 
    232237        echo "Rolling on $layer..." 
     
    256261            m)  LOG_MESSAGE="$OPTARG"; LOG_MESSAGE_SET="true" ;; 
    257262            F)  LOG_FILE="$OPTARG" ;; 
    258             N)  innercall=true ;; 
    259263            *)  echo "Invalid option '-${OPTARG}'." >&4 
    260264                print_usage 1 
     
    274278    $SUDO ${SUDO:+-v} 
    275279 
    276     # This stuff we only do in the top-level call, not on recursive calls... 
    277     if ! conf_lock_is_recursive $wcopy_lock ; then 
    278         conf_update_tree || conf_cleanExit 
    279         if status=$(get_status $files) ; then 
    280             nocommit=false 
    281             msg=$(get_log "$status") || conf_cleanExit 
    282             rm -f "$status" 
    283         fi 
    284         echo "Installation operation started." >&2 
    285         $nocommit || conf_commit_file "$msg" "$files" || return $? 
    286     fi 
    287      
    288     for file in "$@" ; do 
    289         for layer in $(conf_get_recipe) ; do 
    290             conf_install $layer "$@" 
    291         done 
    292         for sing in $SINGULARITIES ; do 
    293             if [ "$sing" = "$file" ] ; then 
    294                 conf_assemble_sing $file || conf_cleanExit 
    295             fi 
    296         done 
     280    conf_update_tree || conf_cleanExit 
     281    if status=$(get_status $files) ; then 
     282        nocommit=false 
     283        msg=$(get_log "$status") || conf_cleanExit 
     284        rm -f "$status" 
     285    fi 
     286    echo "Installation operation started." >&2 
     287    $nocommit || conf_commit_file "$msg" "$files" || return $? 
     288     
     289    for layer in $(conf_get_recipe) ; do 
     290        conf_install $layer "$@" 
     291    done 
     292    for file in $SINGULARITIES ; do 
     293        conf_assemble_sing $file || conf_cleanExit 
    297294    done 
    298295    conf_recordAction install 
     
    859856    wcopy_lock=$(conf_lock_wcopy) 
    860857    conf_ln $target $link $forced 
    861     conf_unlock_wcopy $(wcopy_lock) 
     858    conf_unlock_wcopy $wcopy_lock 
    862859} 
    863860 
     
    880877    wcopy_lock=$(conf_lock_wcopy) 
    881878    conf_chattr "$attr" "$value" "$@" 
    882     conf_unlock_wcopy $(wcopy_lock) 
     879    conf_unlock_wcopy $wcopy_lock 
    883880} 
    884881 
Note: See TracChangeset for help on using the changeset viewer.