From 978deeb4e4fe29db140e3e26dc2dbe0ac8836a23 Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Sun, 23 Apr 2023 20:30:12 +0200 Subject: [PATCH] Allow ^ in version (NVR) --- apollo/rpmutils/regex.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apollo/rpmutils/regex.go b/apollo/rpmutils/regex.go index 0984bb69..a85f6c81 100644 --- a/apollo/rpmutils/regex.go +++ b/apollo/rpmutils/regex.go @@ -48,7 +48,7 @@ var ( func NVR() *regexp.Regexp { if nvr == nil { - nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+]+)-(\\w+(?:\\.[\\w~%+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$") + nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+^]+)-(\\w+(?:\\.[\\w~%+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$") } return nvr } @@ -62,7 +62,7 @@ func NVRNoArch() *regexp.Regexp { func NVRUnusualRelease() *regexp.Regexp { if nvrUnusualRelease == nil { - nvrUnusualRelease = regexp.MustCompile("^(\\S+)-([\\w~%.+]+)-(\\w+?)(?:\\.(\\w+))?(?:\\.rpm)?$") + nvrUnusualRelease = regexp.MustCompile("^(\\S+)-([\\w~%.+^]+)-(\\w+?)(?:\\.(\\w+))?(?:\\.rpm)?$") } return nvrUnusualRelease }