Changeset 97868


Ignore:
Timestamp:
Sep 18, 2012, 11:59:57 AM (12 years ago)
Author:
raimue@…
Message:

port1.0/portconfigure.tcl:
ccache failed with ccache >= 3.1.7, since the initialization did not use
correct permissions. This only creates the directory as root, and then runs the
initialization as macportsuser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portconfigure.tcl

    r92588 r97868  
    231231    global configureccache ccache_dir ccache_size macportsuser
    232232    if {${configureccache}} {
     233        # Create ccache directory with correct permissions with root privileges
    233234        elevateToRoot "configure ccache"
    234235        if [catch {
    235236                file mkdir ${ccache_dir}
    236237                file attributes ${ccache_dir} -owner ${macportsuser} -permissions 0755
     238            } result] {
     239            ui_warn "ccache_dir ${ccache_dir} could not be created; disabling ccache: $result"
     240            set configureccache no
     241        }
     242        dropPrivileges
     243
     244        # Initialize ccache directory with the given maximum size
     245        if {${configureccache}} {
     246            if [catch {
    237247                exec ccache -M ${ccache_size} >/dev/null
    238248            } result] {
    239             ui_warn "ccache_dir ${ccache_dir} could not be initialized; disabling ccache: $result"
    240             set configureccache no
    241         }
    242         dropPrivileges
     249                ui_warn "ccache_dir ${ccache_dir} could not be initialized; disabling ccache: $result"
     250                set configureccache no
     251            }
     252        }
    243253    }
    244254}
Note: See TracChangeset for help on using the changeset viewer.