Ticket #36560: activate_with_compression.patch

File activate_with_compression.patch, 1.4 KB (added by eborisch (Eric A. Borisch), 6 years ago)

Opportunistic bsdtar w/ --hfsCompression usage during activation.

  • src/registry2.0/portimage.tcl

    diff --git a/src/registry2.0/portimage.tcl b/src/registry2.0/portimage.tcl
    index 72dcdfd3..748a783c 100644
    a b proc extract_archive_to_tmpdir {location} { 
    348348            t(ar|bz|lz|xz|gz) {
    349349                set tar "tar"
    350350                if {[catch {set tar [macports::findBinary $tar ${macports::autoconf::tar_path}]} errmsg] == 0} {
    351                     ui_debug "Using $tar"
    352                     set unarchive.cmd "$tar"
    353                     set unarchive.pre_args {-xvpf}
     351                    # Opportunistic HFS compression. bsdtar will automatically
     352                    # ignore if on non-HFS filesystem.
     353                    if {![catch {macports::binaryInPath bsdtar}] &&
     354                        ![catch {exec bsdtar -x --hfsCompression < /dev/null >& /dev/null}]} {
     355                        ui_debug "Using bsdtar with HFS+ compression (if valid)"
     356                        set unarchive.cmd "bsdtar"
     357                        set unarchive.pre_args {-xvp --hfsCompression -f}
     358                    } else {
     359                        ui_debug "Using $tar"
     360                        set unarchive.cmd "$tar"
     361                        set unarchive.pre_args {-xvpf}
     362                    }
    354363                    if {[regexp {z2?$} ${unarchive.type}]} {
    355364                        set unarchive.args {-}
    356365                        if {[regexp {bz2?$} ${unarchive.type}]} {