Use 7zip to extract tar files on platforms that support symlinks
ClosedPublic

Authored by vonreth on Apr 28 2017, 3:49 PM.

Details

Summary

7z is much faster in extracting archives than the build in python functions.
This requires a support for symlinks.

With the build in unpack function its basically impossible to extract oxygen-icons5 as it takes ages.

Test Plan

Tested on Windows and Linux with oxygen-icons5 and openssl

Diff Detail

Repository
R138 Craft
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vonreth created this revision.Apr 28 2017, 3:49 PM
vonreth updated this revision to Diff 13940.Apr 28 2017, 4:18 PM

Don't replace symlinks with copies on unix platforms

vonreth retitled this revision from Use 7zip on platforms that support symlinks, to extrct tar files to Use 7zip to extract tar files on platforms that support symlinks.Apr 28 2017, 4:19 PM
vonreth added a subscriber: Windows.
vonreth updated this revision to Diff 13941.Apr 28 2017, 4:21 PM

Change commit message

vonreth edited the test plan for this revision. (Show Details)Apr 28 2017, 5:00 PM
vonreth added a reviewer: arrowd.
kfunk requested changes to this revision.May 2 2017, 12:07 PM
kfunk added inline comments.
bin/utils.py
794

Typo

795

This check should be done at the call site IMO. replaceSymlinksWithCopys *could* be useful on non-Windows systems, but it isn't required in the un7zip function.

816

Fix your editor settings? :)

This revision now requires changes to proceed.May 2 2017, 12:07 PM
vonreth updated this revision to Diff 14082.May 2 2017, 3:11 PM
vonreth edited edge metadata.

Apply suggested changes

vonreth marked 3 inline comments as done.May 2 2017, 3:13 PM
kfunk added a comment.May 2 2017, 3:41 PM

Phew, and I still don't like the new string substitution syntax (f-strings?). Will have to get used to it I guess... :)

bin/utils.py
283

Minor: Would avoid re-declaring a Python-builtin (type)

kfunk accepted this revision.May 2 2017, 3:41 PM
This revision is now accepted and ready to land.May 2 2017, 3:41 PM
vonreth updated this revision to Diff 14083.May 2 2017, 3:43 PM

Add missing return

This revision was automatically updated to reflect the committed changes.