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:
Joshua Root
2025-07-17 15:58:01 +10:00
parent 23e60c742b
commit 5500c4ab1b
3 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -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 {}}} {
+1 -1
View File
@@ -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
+6
View File
@@ -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 ("