New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Changeset 83268


Ignore:
Timestamp:
08/29/11 05:11:24 (4 years ago)
Author:
jmr@…
Message:

merge r83267 from trunk:

unset TMP/TMPDIR in env if it's not writable or doesn't look like it will be writable by macportsuser (#30749)

Location:
branches/release_2_0
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/release_2_0

  • branches/release_2_0/base

  • branches/release_2_0/base/portmgr/fedora/macports.spec

  • branches/release_2_0/base/src/macports1.0/macports.tcl

    r83145 r83268  
    827827    } 
    828828 
     829    # make tools we run operate in UTF-8 mode 
     830    set env(LANG) en_US.UTF-8 
     831 
    829832    # ENV cleanup. 
    830833    set keepenvkeys { 
     
    833836        DYLD_LIBRARY_PATH DYLD_INSERT_LIBRARIES 
    834837        HOME JAVA_HOME MASTER_SITE_LOCAL ARCHIVE_SITE_LOCAL 
    835         PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY TMP TMPDIR 
    836         USER GROUP 
     838        PATCH_SITE_LOCAL PATH PORTSRC RSYNC_PROXY 
     839        USER GROUP LANG 
    837840        http_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY NO_PROXY 
    838841        COLUMNS LINES 
     
    840843    if {[info exists extra_env]} { 
    841844        set keepenvkeys [concat ${keepenvkeys} ${extra_env}] 
    842     } 
    843  
    844     set env_names [array names env] 
    845     foreach envkey $env_names { 
    846         if {[lsearch -exact $keepenvkeys $envkey] == -1} { 
    847             unset env($envkey) 
    848         } 
    849     } 
    850  
    851     # make tools we run operate in UTF-8 mode 
    852     set env(LANG) en_US.UTF-8 
    853  
    854     if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} { 
    855         # We'll resolve these later (if needed) 
    856         trace add variable macports::xcodeversion read macports::setxcodeinfo 
    857         trace add variable macports::xcodebuildcmd read macports::setxcodeinfo 
    858     } 
    859  
    860     # Set the default umask 
    861     if {![info exists destroot_umask]} { 
    862         set destroot_umask 022 
    863     } 
    864  
    865     if {[info exists master_site_local] && ![info exists env(MASTER_SITE_LOCAL)]} { 
    866         set env(MASTER_SITE_LOCAL) "$master_site_local" 
    867     } 
    868     if {[info exists patch_site_local] && ![info exists env(PATCH_SITE_LOCAL)]} { 
    869         set env(PATCH_SITE_LOCAL) "$patch_site_local" 
    870     } 
    871     if {[info exists archive_site_local] && ![info exists env(ARCHIVE_SITE_LOCAL)]} { 
    872         set env(ARCHIVE_SITE_LOCAL) "$archive_site_local" 
    873845    } 
    874846 
     
    887859    } 
    888860 
     861    # don't keep unusable TMPDIR/TMP values 
     862    foreach var {TMP TMPDIR} { 
     863        if {[info exists env($var)] && [file writable $env($var)] &&  
     864            ([getuid] != 0 || $macportsuser == "root" || 
     865             [file attributes $env($var) -owner] == $macportsuser)} { 
     866            lappend keepenvkeys $var 
     867        } 
     868    } 
     869 
     870    set env_names [array names env] 
     871    foreach envkey $env_names { 
     872        if {[lsearch -exact $keepenvkeys $envkey] == -1} { 
     873            unset env($envkey) 
     874        } 
     875    } 
     876 
    889877    # unset environment an extra time, to work around bugs in Leopard Tcl 
    890878    if {$macosx_version == "10.5"} { 
     
    894882            } 
    895883        } 
     884    } 
     885 
     886    if {![info exists xcodeversion] || ![info exists xcodebuildcmd]} { 
     887        # We'll resolve these later (if needed) 
     888        trace add variable macports::xcodeversion read macports::setxcodeinfo 
     889        trace add variable macports::xcodebuildcmd read macports::setxcodeinfo 
     890    } 
     891 
     892    # Set the default umask 
     893    if {![info exists destroot_umask]} { 
     894        set destroot_umask 022 
     895    } 
     896 
     897    if {[info exists master_site_local] && ![info exists env(MASTER_SITE_LOCAL)]} { 
     898        set env(MASTER_SITE_LOCAL) "$master_site_local" 
     899    } 
     900    if {[info exists patch_site_local] && ![info exists env(PATCH_SITE_LOCAL)]} { 
     901        set env(PATCH_SITE_LOCAL) "$patch_site_local" 
     902    } 
     903    if {[info exists archive_site_local] && ![info exists env(ARCHIVE_SITE_LOCAL)]} { 
     904        set env(ARCHIVE_SITE_LOCAL) "$archive_site_local" 
    896905    } 
    897906 
  • branches/release_2_0/base/src/pextlib1.0/sha2.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/pextlib1.0/sha2.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/pextlib1.0/sha256cmd.c

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/pextlib1.0/sha256cmd.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/release_2_0/base/src/registry2.0/receipt_sqlite.tcl

    • Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset for help on using the changeset viewer.