2022-10-27 02:00:37 +00:00
|
|
|
From af9a2347cd725a8dbb6045d7d3e9661d524af110 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: openEuler Buildteam <buildteam@openeuler.org>
|
|
|
|
|
Date: Wed, 4 Mar 2020 16:12:58 +0800
|
|
|
|
|
Subject: [PATCH] add dist to release by default
|
2020-03-04 21:30:21 +08:00
|
|
|
|
|
|
|
|
---
|
|
|
|
|
build/parsePreamble.c | 7 +++++++
|
|
|
|
|
1 file changed, 7 insertions(+)
|
|
|
|
|
|
|
|
|
|
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
|
2022-10-27 02:00:37 +00:00
|
|
|
index b0a17c8..cac899a 100644
|
2020-03-04 21:30:21 +08:00
|
|
|
--- a/build/parsePreamble.c
|
|
|
|
|
+++ b/build/parsePreamble.c
|
2022-10-27 02:00:37 +00:00
|
|
|
@@ -808,6 +808,11 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
|
2020-03-04 21:30:21 +08:00
|
|
|
case RPMTAG_VERSION:
|
|
|
|
|
case RPMTAG_RELEASE:
|
|
|
|
|
SINGLE_TOKEN_ONLY;
|
2022-10-27 02:00:37 +00:00
|
|
|
+ if (tag == RPMTAG_RELEASE) {
|
2020-03-04 21:30:21 +08:00
|
|
|
+ char *dist = rpmExpand("%{?dist}",NULL);
|
|
|
|
|
+ rasprintf(&field,"%s%s",field,dist);
|
|
|
|
|
+ free(dist);
|
|
|
|
|
+ }
|
2023-02-02 10:49:39 +08:00
|
|
|
if (rpmCharCheck(spec, field, ALLOWED_CHARS_VERREL, NULL))
|
2020-03-04 21:30:21 +08:00
|
|
|
goto exit;
|
|
|
|
|
headerPutString(pkg->header, tag, field);
|
2022-10-27 02:00:37 +00:00
|
|
|
@@ -987,6 +992,8 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag,
|
2020-03-04 21:30:21 +08:00
|
|
|
}
|
|
|
|
|
rc = RPMRC_OK;
|
|
|
|
|
exit:
|
|
|
|
|
+ if (tag == RPMTAG_RELEASE)
|
|
|
|
|
+ free(field);
|
|
|
|
|
return rc;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
--
|
2022-10-27 02:00:37 +00:00
|
|
|
1.8.3.1
|
2020-03-04 21:30:21 +08:00
|
|
|
|