Changeset 97871


Ignore:
Timestamp:
Sep 18, 2012, 12:05:45 PM (12 years ago)
Author:
raimue@…
Message:

Merge r97868 and r97869 from trunk: ccache intialization fixes

Location:
branches/release_2_1/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/release_2_1/base

  • branches/release_2_1/base/ChangeLog

    r96540 r97871  
    99      it should start from the beginning.
    1010      (#29223, cal in r96136, r96399, r96400, r96538)
     11
     12    - Fix permission problem in the creation of the ccache directory with
     13      ccache >= 3.1.7 by running the initialization step as the macportsuser.
     14      (raimue in r97868)
    1115
    1216Release 2.1.2 (2012-07-26 by jmr):
  • branches/release_2_1/base/src/port1.0/portconfigure.tcl

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