From: Junghyun Kim Date: Thu, 4 Aug 2016 22:44:20 +0000 (+0900) Subject: Do not compare the project name for prerelease projects. X-Git-Tag: accepted/tizen/base/20160805.171156^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F43%2F82643%2F1;p=platform%2Fupstream%2Fbuild-compare.git 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 --- 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"