From e6445354683f23b5bb23c8fdd6bf5653026d6dd2 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Apr 13 2024 21:46:33 +0000 Subject: rpmname: fix use_new_versioning regex filippo.io/edwards25519 should be golang-filippo-edwards25519, not golang-filippo-edwards2551_9. Fixes: https://pagure.io/GoSIG/go2rpm/issue/37 Relates: https://gitlab.com/fedora/sigs/go/go2rpm/-/commit/8b7ae828e5e4099069a7f1976e8d1c2a5ed9da3c --- diff --git a/rpm/lua/srpm/go.lua b/rpm/lua/srpm/go.lua index b412b7a..01a43a1 100644 --- a/rpm/lua/srpm/go.lua +++ b/rpm/lua/srpm/go.lua @@ -76,7 +76,7 @@ local function rpmname(goipath, compatid) -- If the base package name ends with a digit, a single underscore (_) MUST -- be appended to the name, and the version MUST be appended to that, in -- order to avoid confusion over where the name ends and the version begins. - result = string.gsub(result, "([^-]*)(%-?)([%.%d]+)$", function(prior, hyphen, version) + result = string.gsub(result, "([^-]*)(%-)([%.%d]+)$", function(prior, hyphen, version) if string.find(prior, "%d$") then return prior .. "_" .. version else