Compare commits

..

2 Commits

Author SHA1 Message Date
Ivan Shapovalov
805ff8ce74 Merge branch 'work/fix-pkgctl-version-upgrade' into 'master'
fix(pkgctl): handle pkgver values containing regex metacharacters

See merge request archlinux/devtools!311
2025-07-28 05:22:54 +00:00
Ivan Shapovalov
ec9f0548bc fix(pkgctl): handle pkgver values containing regex metacharacters
`pkgbuild_set_pkgver()` used the value of `$pkgver` directly in regular
expressions, which breaks if said value happens to contain e.g. a `+`.
Fix this by escaping all possible regex metacharacters in `$pkgver`.
2025-05-12 19:54:48 +02:00
3 changed files with 1 additions and 4 deletions

View File

@@ -150,7 +150,6 @@ _pkgctl_cmds=(
db db
diff diff
issue issue
license
release release
repo repo
search search

View File

@@ -155,7 +155,7 @@ if (( ${#needsversioning[*]} )); then
if [[ ! -f "${file}" ]]; then if [[ ! -f "${file}" ]]; then
continue continue
fi fi
if ! git ls-files --error-unmatch "$file" >/dev/null; then if ! git ls-files --error-unmatch "$file"; then
die "%s is not under version control" "$file" die "%s is not under version control" "$file"
fi fi
done done

View File

@@ -191,9 +191,7 @@ path = [
".nvchecker.toml", ".nvchecker.toml",
"*.install", "*.install",
"*.sysusers", "*.sysusers",
"*sysusers.conf",
"*.tmpfiles", "*.tmpfiles",
"*tmpfiles.conf",
"*.logrotate", "*.logrotate",
"*.pam", "*.pam",
"*.service", "*.service",