Skip to content

Commit

Permalink
Keep destroot.keepdirs inside of $destroot
Browse files Browse the repository at this point in the history
  • Loading branch information
jmroot committed Oct 3, 2023
1 parent 7ed853d commit 8db11c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/port1.0/portdestroot.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

package provide portdestroot 1.0
package require portutil 1.0
package require fileutil

set org.macports.destroot [target_new org.macports.destroot portdestroot::destroot_main]
target_provides ${org.macports.destroot} destroot
Expand Down Expand Up @@ -175,6 +176,8 @@ proc portdestroot::destroot_finish {args} {

# Prune empty directories in ${destroot}
foreach path ${destroot.keepdirs} {
# Prepend $destroot if $path isn't already inside it
set path [::fileutil::jail $destroot $path]
if {![file isdirectory ${path}]} {
xinstall -m 0755 -d ${path}
}
Expand Down

0 comments on commit 8db11c8

Please sign in to comment.