summaryrefslogtreecommitdiff
path: root/Don-t-add-dist-to-release-if-it-is-already-there.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-09-10 03:05:12 +0000
committerCoprDistGit <infra@openeuler.org>2023-09-10 03:05:12 +0000
commit2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 (patch)
treea2af4fd609c7decacbf0ea11926ea338596fb179 /Don-t-add-dist-to-release-if-it-is-already-there.patch
parent0ae9f87336a3d78d8fbc0a1e5c75cba5f9cf8597 (diff)
automatic import of rpm
Diffstat (limited to 'Don-t-add-dist-to-release-if-it-is-already-there.patch')
-rw-r--r--Don-t-add-dist-to-release-if-it-is-already-there.patch26
1 files changed, 26 insertions, 0 deletions
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 <roberto.sassu@huawei.com>
+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
+