Closed xepa closed 1 year ago
To add to this: the regexp used in apt::mark
is wrong on more than just the dot, for Debian and Ubuntu:
if $title !~ /^[a-zA-Z0-9\-_]+$/ {
fail("Invalid package name: ${title}")
}
As per the Debian Policy manual:
Package names (both source and binary) must consist only of lower case letters (a-z), digits (0-9), plus (+) and minus (-) signs, and periods (.). They must be at least two characters long and must start with an alphanumeric character.
So, the '+' and '.' are missing, and the '_' should go.
It might be better to refactor the regex to the following this would satisfy the title policy of Debian (and I would assume Ubuntu), just let me know and I can refactor it in the PR for this issue
^[a-z0-9]{2}[a-z0-9.+\-]*$
edit: updated, you are right, bit quick of me thanks @tinuzz
Just a small note: in a character class, the dot and the plus sign don't have to be escaped.
I have updated the PR to reflect the latest input of @tinuzz
Describe the Bug
Expected Behavior
Package should be held (this is a regression)
Steps to Reproduce
Mark any package containing a . in the package name
Environment
Additional Context
there are some other packages with a . in the name.