Skip to content

Commit

Permalink
Disable hfscompression for non-root installs
Browse files Browse the repository at this point in the history
Due to a bug in bsdtar, xattrs fail to be restored for read-only files.
Being root naturally circumvents this problem.

See: https://trac.macports.org/ticket/56563
  • Loading branch information
jmroot committed Jun 1, 2018
1 parent feaba00 commit cf91a8b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/registry2.0/portimage.tcl
Expand Up @@ -353,7 +353,8 @@ proc extract_archive_to_tmpdir {location} {
global macports::hfscompression
# Opportunistic HFS compression. bsdtar will automatically
# disable this if filesystem does not support compression.
if {${macports::hfscompression} &&
# Have to be root due to <https://trac.macports.org/ticket/56563>.
if {${macports::hfscompression} && [getuid] == 0 &&
![catch {macports::binaryInPath bsdtar}] &&
![catch {exec bsdtar -x --hfsCompression < /dev/null >& /dev/null}]} {
ui_debug "Using bsdtar with HFS+ compression (if valid)"
Expand Down

0 comments on commit cf91a8b

Please sign in to comment.