diff options
author | Helmut Grohne <helmut@subdivi.de> | 2025-05-19 17:18:06 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2025-05-19 17:18:06 +0200 |
commit | 99361dcae65c82c6e1df830be849226a1715b50c (patch) | |
tree | 711a406d8fe4f72b6dc4d8324eae246952fae08b /multiarchimport.py | |
parent | dad32e42b9c9ef72e77d6c17930c194f92ff9e11 (diff) | |
download | debian-dedup-99361dcae65c82c6e1df830be849226a1715b50c.tar.gz |
multiarchanalyze: improve pycompile detectionmultiarchhints
* Write tabs as \t to prevent auto formatters from turning them into
spaces.
* Allow colon in package names as some of them are arch qualified.
Diffstat (limited to 'multiarchimport.py')
-rwxr-xr-x | multiarchimport.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/multiarchimport.py b/multiarchimport.py index 7d43938..33bf9dd 100755 --- a/multiarchimport.py +++ b/multiarchimport.py @@ -23,10 +23,10 @@ set -e # Automatically added by dh_python3 if command -v py3compile >/dev/null 2>&1; then - py3compile +\tpy3compile fi if command -v pypy3compile >/dev/null 2>&1; then - pypy3compile || true +\tpypy3compile || true fi # End automatically added section @@ -36,10 +36,10 @@ set -e # Automatically added by dh_python3 if command -v py3clean >/dev/null 2>&1; then - py3clean +\tpy3clean else - dpkg| sed -En -e '/^(.*)\\/(.+)\\.py$/s,,rm "\\1/__pycache__/\\2".*,e' - find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir +\tdpkg| sed -En -e '/^(.*)\\/(.+)\\.py$/s,,rm "\\1/__pycache__/\\2".*,e' +\tfind /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir fi # End automatically added section @@ -49,10 +49,10 @@ set -e # Automatically added by dh_python3 if which py3compile >/dev/null 2>&1; then - py3compile +\tpy3compile fi if which pypy3compile >/dev/null 2>&1; then - pypy3compile || true +\tpypy3compile || true fi # End automatically added section @@ -62,10 +62,10 @@ set -e # Automatically added by dh_python3 if which py3clean >/dev/null 2>&1; then - py3clean +\tpy3clean else - dpkg| perl -ne 's,/([^/]*)\\.py$,/__pycache__/\\1.*, or next; unlink $_ or die $! foreach glob($_)' - find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir +\tdpkg| perl -ne 's,/([^/]*)\\.py$,/__pycache__/\\1.*, or next; unlink $_ or die $! foreach glob($_)' +\tfind /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir fi # End automatically added section @@ -145,7 +145,7 @@ class MultiarchExtractor(DebExtractor): def handle_control_member(self, name, content): if name in ("preinst", "postinst", "prerm", "postrm"): if b"dh_python3" in content: - generic_content = re.sub(b" -(p|L) python3-[a-z0-9+.-]+ ", b"", content) + generic_content = re.sub(b" -[pL] python3-[a-z0-9+.:-]+ ", b"", content) if generic_content in PYTHON_MAINT_CONTENT: return self.result["hasscripts"] = True |