aboutsummaryrefslogtreecommitdiffstats
path: root/modules/packages/arch/metadata.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/packages/arch/metadata.go')
-rw-r--r--modules/packages/arch/metadata.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/packages/arch/metadata.go b/modules/packages/arch/metadata.go
index 06a2206a36..3d7bdf3997 100644
--- a/modules/packages/arch/metadata.go
+++ b/modules/packages/arch/metadata.go
@@ -43,8 +43,9 @@ var (
ErrInvalidArchitecture = util.NewInvalidArgumentErrorf("package architecture is invalid")
// https://man.archlinux.org/man/PKGBUILD.5
- namePattern = regexp.MustCompile(`\A[a-zA-Z0-9@._+-]+\z`)
- versionPattern = regexp.MustCompile(`\A(?:[0-9]:)?[a-zA-Z0-9.+~]+(?:-[a-zA-Z0-9.+-~]+)?\z`)
+ namePattern = regexp.MustCompile(`\A[a-zA-Z0-9@._+-]+\z`)
+ // (epoch:pkgver-pkgrel)
+ versionPattern = regexp.MustCompile(`\A(?:\d:)?[\w.+~]+(?:-[-\w.+~]+)?\z`)
)
type Package struct {