Skip to content

Commit

Permalink
Fix NVR regex for versions with a percentage, and fix dist regex for …
Browse files Browse the repository at this point in the history
…any EL
  • Loading branch information
mstg committed May 2, 2022
1 parent dd7fd31 commit f7017a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/rpmutils/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package rpmutils
import "regexp"

var (
Nvr = regexp.MustCompile("^(\\S+)-([\\w.]+)-(\\w+(?:\\.[\\w+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$")
Nvr = regexp.MustCompile("^(\\S+)-([\\w~%.]+)-(\\w+(?:\\.[\\w+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$")
epoch = regexp.MustCompile("(\\d+):")
module = regexp.MustCompile("^(.+)-(.+)-([0-9]{19})\\.((?:.+){8})$")
dist = regexp.MustCompile("(\\.el8(?:(?:_\\d)|))")
dist = regexp.MustCompile("(\\.el\\d(?:_\\d|))")
moduleDist = regexp.MustCompile("\\.module.+$")
)

0 comments on commit f7017a9

Please sign in to comment.