Allow ^ in version (NVR)

This commit is contained in:
Mustafa Gezen 2023-04-23 20:30:12 +02:00
parent 10aab151d5
commit 978deeb4e4
Signed by untrusted user who does not match committer: mustafa
GPG Key ID: DCDF010D946438C1
1 changed files with 2 additions and 2 deletions

View File

@ -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
}