Skip to content

Commit

Permalink
not all branches match the path/port/version template
Browse files Browse the repository at this point in the history
  • Loading branch information
neutralinsomniac committed Mar 31, 2021
1 parent 9379f50 commit c520dff
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/obsdpkgup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,12 @@ func main() {
// did we find an upgrade?
if !bestVersionMatch.Equals(installedVersion) {
var index string
index = name
if installedVersion.isBranch {
ver := pkgpathVersionRE.FindStringSubmatch(installedVersion.pkgpath)[1]
index = fmt.Sprintf("%s%%%s", name, ver)
} else {
index = name
res := pkgpathVersionRE.FindStringSubmatch(installedVersion.pkgpath)
if len(res) == 2 {
index = fmt.Sprintf("%s%%%s", name, res[1])
}
}
updateList[index] = true
fmt.Fprintf(os.Stderr, "%s->%s", installedVersion.fullName, bestVersionMatch.version)
Expand Down

0 comments on commit c520dff

Please sign in to comment.