Commit graph

16 commits

Author SHA1 Message Date
87b9b385b3
tarfilter: do not rely on paths being absolute (starting with a single slash) 2024-09-13 01:16:31 +02:00
199e577757
tarfilter: add --type-exclude option 2023-10-23 10:26:47 +02:00
6068e7d22e
tarfilter: fixup comment 2023-09-27 07:49:04 +02:00
3c0990d050
tarfilter, coverage.py: changes for black 23.1.0 2023-02-12 14:05:09 +01:00
7d7d757f00
tarfilter: add --transform option 2022-08-31 05:52:28 +02:00
902bc55c4d
tarfilter --idshift now provides taridshift 2022-08-31 05:35:40 +02:00
e3a7b7d013
tarfilter: add --strip-components option 2022-02-11 22:56:38 +01:00
39a266bce2
add my name to several scripts 2021-09-16 16:24:16 +02:00
dddccd5e55
tarfilter: expand description text 2021-08-23 10:33:31 +02:00
236b84a486
tarfilter: add --pax-exclude and --pax-include to strip extended attributes because tar2sqfs only supports user.*, trusted.* and security.* 2021-05-07 09:39:40 +02:00
bd5d3c3dab
tarfilter: remove leftover debugging statement 2021-05-07 09:20:36 +02:00
bbf12c221d
tarfilter: fixup last commit by formatting with black 2021-02-22 13:45:55 +01:00
Benjamin Drung
043ab3bbf0
tarfilter: Compile prefix pattern only once
According to Debian bug #978742, mmtarfilter has a slow performance with
many path exclusions. The execution can be speed up if the regular
expression is only compiled once instead of every time in the hot loop.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2021-02-22 13:15:16 +01:00
Josh Triplett
5a7dbc10c7
Optimize mmtarfilter to handle many path exclusions
mmtarfilter uses fnmatch to handle path exclusions and inclusions.
Python's fnmatch handles shell patterns by translating them to regular
expressions, with a 256-entry LRU cache. With more than 256 path
exclusions or inclusions, this LRU cache no longer works, and every
invocation of fnmatch on every file in every package will re-translate
and re-compile a regular expression, resulting in much worse
performance.

Translate all the shell patterns to regular expressions once. For an
mmdebstrap invocation with around 500 path filters, this speeds up
mmdebstrap by more than a minute.
2021-01-06 14:58:10 +01:00
c51c69ca13
tarfilter/taridshift: use argparse 2020-11-27 00:32:14 +01:00
465c056434
no longer needs to install twice when --depkgopt=path-exclude is given by filtering the tarball with new tarfilter utility 2020-08-25 13:02:33 +02:00