Skip to content

Commit

Permalink
Permit the '@' character in files/
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
floppym committed Jun 2, 2024
1 parent 257d394 commit 4526684
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pkgcheck/checks/pkgdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down Expand Up @@ -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
)
Expand Down

0 comments on commit 4526684

Please sign in to comment.