You've already forked macports-base
mirror of
https://github.com/macports/macports-base.git
synced 2026-07-12 18:18:43 -07:00
Don't fully normalize build path
This allows path-related options in Portfiles to have consistent values whether or not the build path currently exists. Closes: https://trac.macports.org/ticket/72701
This commit is contained in:
@@ -3132,7 +3132,7 @@ proc macports::getportbuildpath {id {portname {}}} {
|
||||
variable portdbpath
|
||||
regsub {://} $id {.} port_path
|
||||
regsub -all {/} $port_path {_} port_path
|
||||
return [file join $portdbpath build $port_path $portname]
|
||||
return [file join [file normalize [file join $portdbpath build]] $port_path $portname]
|
||||
}
|
||||
|
||||
proc macports::getportlogpath {id {portname {}}} {
|
||||
@@ -3143,7 +3143,7 @@ proc macports::getportlogpath {id {portname {}}} {
|
||||
}
|
||||
|
||||
proc macports::getportworkpath_from_buildpath {portbuildpath} {
|
||||
return [file normalize [file join $portbuildpath work]]
|
||||
return [file join $portbuildpath work]
|
||||
}
|
||||
|
||||
proc macports::getportworkpath_from_portdir {portpath {portname {}}} {
|
||||
|
||||
@@ -102,7 +102,7 @@ proc portmain::get_subbuildpath {} {
|
||||
global portpath
|
||||
set subdir [file tail $portpath]
|
||||
}
|
||||
return [file normalize [file join $portbuildpath $subdir]]
|
||||
return [file join $portbuildpath $subdir]
|
||||
}
|
||||
default workpath {[getportworkpath_from_buildpath $subbuildpath]}
|
||||
default prefix /opt/local
|
||||
|
||||
@@ -131,6 +131,12 @@ proc portsandbox::set_profile {target} {
|
||||
}
|
||||
}
|
||||
|
||||
foreach dir $allow_dirs {
|
||||
set normdir [file normalize $dir]
|
||||
if {$dir ne $normdir} {
|
||||
lappend allow_dirs $normdir
|
||||
}
|
||||
}
|
||||
foreach dir $allow_dirs {
|
||||
foreach perm $perms {
|
||||
append portsandbox_profile " (allow $perm ("
|
||||
|
||||
Reference in New Issue
Block a user