From faab67ac6f96ac2f760f243d7ccd8b004d03cd5a Mon Sep 17 00:00:00 2001 From: Junghyun Kim Date: Fri, 5 Aug 2016 07:44:20 +0900 Subject: Do not compare the project name for prerelease projects. If the project name includes "prerelease", do not compare DISTRIBUTION in rpmtags. Change-Id: I77a344093aab89bddebf4a3041a59237205cf2f5 Signed-off-by: Junghyun Kim --- packaging/functions.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packaging/functions.sh b/packaging/functions.sh index a46c384..fbb8618 100644 --- a/packaging/functions.sh +++ b/packaging/functions.sh @@ -109,7 +109,7 @@ function cmp_spec () # don't look at RELEASE, it contains our build number QF="$QF %{VERSION} %{EPOCH}\\n" QF="$QF %{SUMMARY}\\n%{DESCRIPTION}\\n" - QF="$QF %{VENDOR} %{DISTRIBUTION} %{DISTURL}" + QF="$QF %{VENDOR}\\n" QF="$QF %{LICENSE} %{LICENSE}\\n" QF="$QF %{GROUP} %{URL} %{EXCLUDEARCH} %{EXCLUDEOS} %{EXCLUSIVEARCH}\\n" QF="$QF %{EXCLUSIVEOS} %{RPMVERSION} %{PLATFORM}\\n" @@ -131,6 +131,23 @@ function cmp_spec () check_header $oldrpm > $file1 check_header $newrpm > $file2 + + if [ -n $newrpm ]; then + # if the rpm is from prerelease projects, do not compare project name. + QF="%{DISTRIBUTION}" + dist=$(check_header $newrpm | sed -r 's/(.*)\/.*/\1/') + if [[ $dist =~ "prerelease" ]]; then + echo "This is a prerelease project. Do not compare the project name." + QF="%{DISTURL}\\n" + echo `check_header $oldrpm | sed -r 's/.*\/(.*\/.*)/\1/'` >> $file1 + echo `check_header $newrpm | sed -r 's/.*\/(.*\/.*)/\1/'` >> $file2 + else + QF="%{DISTURL} %{DISTRIBUTION}\\n" + echo "This is not a prerelease project. Compare the project name." + check_header $oldrpm >> $file1 + check_header $newrpm >> $file2 + fi + fi # the DISTURL tag can be used as checkin ID #echo "$QF" -- cgit v1.2.3