From 45266849848c31537b0cd43d6bd37bd11782ee3a Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Sat, 1 Jun 2024 20:11:05 -0400 Subject: [PATCH] Permit the '@' character in files/ This will allow for systemd template units to be stored in files/ without mangling the filename. PMS says nothing about filenames in files/ so we can really permit whatever we find palatable. Signed-off-by: Mike Gilbert --- src/pkgcheck/checks/pkgdir.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pkgcheck/checks/pkgdir.py b/src/pkgcheck/checks/pkgdir.py index ef90baac5..6d53c4e0b 100644 --- a/src/pkgcheck/checks/pkgdir.py +++ b/src/pkgcheck/checks/pkgdir.py @@ -19,6 +19,10 @@ allowed_filename_chars.update(chr(x) for x in range(ord("0"), ord("9") + 1)) allowed_filename_chars.update([".", "-", "_", "+", ":"]) +# Allow '@' in files/ +allowed_filesdir_chars = allowed_filename_chars.copy() +allowed_filesdir_chars.add("@") + class MismatchedPN(results.PackageResult, results.Error): """Ebuilds that have different names than their parent directory.""" @@ -289,7 +293,7 @@ def feed(self, pkgset): yield SizeViolation( pjoin(base_dir, filename), file_stat.st_size, pkg=pkg ) - if banned_chars := set(filename) - allowed_filename_chars: + if banned_chars := set(filename) - allowed_filesdir_chars: yield BannedCharacter( pjoin(base_dir, filename), sorted(banned_chars), pkg=pkg )