From 2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 10 Sep 2023 03:05:12 +0000 Subject: automatic import of rpm --- ...dd-dist-to-release-if-it-is-already-there.patch | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Don-t-add-dist-to-release-if-it-is-already-there.patch (limited to 'Don-t-add-dist-to-release-if-it-is-already-there.patch') diff --git a/Don-t-add-dist-to-release-if-it-is-already-there.patch b/Don-t-add-dist-to-release-if-it-is-already-there.patch new file mode 100644 index 0000000..8820ef2 --- /dev/null +++ b/Don-t-add-dist-to-release-if-it-is-already-there.patch @@ -0,0 +1,26 @@ +From 90b01a63c7c3312c25d2c3b74508a98b51e703fa Mon Sep 17 00:00:00 2001 +From: Roberto Sassu +Date: Wed, 22 Jul 2020 17:24:58 +0200 +Subject: [PATCH 3/3] Don't add dist to release if it is already there + +--- + build/parsePreamble.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/build/parsePreamble.c b/build/parsePreamble.c +index 147059bb5..c3d898b4c 100644 +--- a/build/parsePreamble.c ++++ b/build/parsePreamble.c +@@ -810,7 +810,8 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, + SINGLE_TOKEN_ONLY; + if (tag == RPMTAG_RELEASE) { + char *dist = rpmExpand("%{?dist}",NULL); +- rasprintf(&field,"%s%s",field,dist); ++ rasprintf(&field,"%s%s",field, ++ (dist && strstr(field, dist)) ? "" : dist); + free(dist); + } + if (rpmCharCheck(spec, field, ALLOWED_CHARS_VERREL)) +-- +2.27.GIT + -- cgit v1.2.3