Projects
openEuler:24.03:SP1:Everything
openjdk-1.8.0
_service:tar_scm:Support-Git-commit-ID-in-the-S...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:Support-Git-commit-ID-in-the-SOURCE-field-of-the-release.patch of Package openjdk-1.8.0
From 9945034658585ea943e6326340c06b5932af8d67 Mon Sep 17 00:00:00 2001 Date: Thu, 5 Dec 2019 10:29:18 +0000 Subject: [PATCH] Support 'Git commit ID' in the SOURCE field of the release file. Summary: <make>:Support 'Git commit ID' in the SOURCE field of the release file. LLT: NA Bug url: NA --- common/autoconf/spec.gmk.in | 1 + make/common/MakeBase.gmk | 29 +++++++++++++++++------------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index 88f9f539..506cf617 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -578,6 +578,7 @@ READELF:=@READELF@ EXPR:=@EXPR@ FILE:=@FILE@ HG:=@HG@ +GIT:=@GIT@ OBJCOPY:=@OBJCOPY@ SETFILE:=@SETFILE@ XATTR:=@XATTR@ diff --git a/make/common/MakeBase.gmk b/make/common/MakeBase.gmk index 9e5e704b..9b7ad702 100644 --- a/make/common/MakeBase.gmk +++ b/make/common/MakeBase.gmk @@ -308,18 +308,23 @@ REPO_LIST = $(patsubst ./%,%,$(patsubst %/,%,$(sort $(dir \ # Emit the repo:id pairs to $@ define GetSourceTips - $(CD) $(SRC_ROOT) ; \ - for i in $(REPO_LIST) IGNORE ; do \ - if [ "$${i}" = "IGNORE" ] ; then \ - continue; \ - elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \ - $(PRINTF) " %s:%s" \ - "$${i}" `$(HG) id -i --repository $${i}` ; \ - elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \ - $(PRINTF) " %s:%s" \ - "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \ - fi; \ - done >> $@ + $(if $(and $(HG), $(wildcard $(TOPDIR)/.hg)), \ + $$($(CD) $(SRC_ROOT) ; \ + for i in $(REPO_LIST) IGNORE ; do \ + if [ "$${i}" = "IGNORE" ] ; then \ + continue; \ + elif [ -d $${i}/$(HG_DIRECTORY) -a "$(HG_VERSION)" != "" ] ; then \ + $(PRINTF) " %s:%s" \ + "$${i}" `$(HG) id -i --repository $${i}` ; \ + elif [ -f $${i}/$(HGTIP_FILENAME) ] ; then \ + $(PRINTF) " %s:%s" \ + "$${i}" `$(CAT) $${i}/$(HGTIP_FILENAME)` ; \ + fi; \ + done >> $@), \ + $(if $(and $(GIT), $(wildcard $(TOPDIR)/.git)), \ + $(PRINTF) ".:git:%s%s\n" \ + "$$(git log -n1 --format=%H | cut -c1-12)" \ + "$$(if test -n "$$(git status --porcelain)"; then printf '+'; fi)" >> $@, )) $(PRINTF) "\n" >> $@ endef -- 2.19.0
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