Projects
openEuler:24.03:SP1:Everything
rpm
_service:tar_scm:add-dist-to-release-by-default...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:add-dist-to-release-by-default.patch of Package rpm
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 --- build/parsePreamble.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index b0a17c8..cac899a 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -808,6 +808,11 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, case RPMTAG_VERSION: case RPMTAG_RELEASE: SINGLE_TOKEN_ONLY; + if (tag == RPMTAG_RELEASE) { + char *dist = rpmExpand("%{?dist}",NULL); + rasprintf(&field,"%s%s",field,dist); + free(dist); + } if (rpmCharCheck(spec, field, ALLOWED_CHARS_VERREL, NULL)) goto exit; headerPutString(pkg->header, tag, field); @@ -987,6 +992,8 @@ static rpmRC handlePreambleTag(rpmSpec spec, Package pkg, rpmTagVal tag, } rc = RPMRC_OK; exit: + if (tag == RPMTAG_RELEASE) + free(field); return rc; } -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2