summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunghyun Kim <jh0822.kim@samsung.com>2016-11-25 16:35:42 +0900
committerJunghyun Kim <jh0822.kim@samsung.com>2016-11-25 16:35:42 +0900
commit2c7031f15715af60e28766869a6551095afca72f (patch)
treecbc2de2d43e8a24fc31a17b4af984e898e38fb6d
parentfe954a1ba70ef2c597cb53c6385d5eecb1a6c48b (diff)
downloadbuild-compare-2c7031f15715af60e28766869a6551095afca72f.tar.gz
build-compare-2c7031f15715af60e28766869a6551095afca72f.tar.bz2
build-compare-2c7031f15715af60e28766869a6551095afca72f.zip
TRBS projects are similar to prerelease projects, so the same technique is applied to TRBS projects for unnecessary rebuilding. Change-Id: I6370473ce75caa20d2e4325c66a8c03aa643dba6 Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
-rw-r--r--packaging/functions.sh12
-rw-r--r--packaging/same-build-result.sh2
2 files changed, 12 insertions, 2 deletions
diff --git a/packaging/functions.sh b/packaging/functions.sh
index fbb8618..89057a5 100644
--- a/packaging/functions.sh
+++ b/packaging/functions.sh
@@ -15,6 +15,16 @@ check_header()
$RPM --qf "$QF" "$1"
}
+function is_prerelease_project() {
+ local proj_name=$1
+ if [[ $proj_name =~ "prerelease" ]] || [[ $proj_name =~ "trbs" ]]; then
+ return 1
+ fi
+
+ return 0
+}
+
+
# Trim version-release string:
# - it is used as direntry below certain paths
# - it is assigned to some variable in scripts, at the end of a line
@@ -136,7 +146,7 @@ function cmp_spec ()
# 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
+ if ! is_prerelease_project $dist; 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
diff --git a/packaging/same-build-result.sh b/packaging/same-build-result.sh
index e46999f..2e879e4 100644
--- a/packaging/same-build-result.sh
+++ b/packaging/same-build-result.sh
@@ -33,7 +33,7 @@ fi
first_rpm=$(find $NEWDIRS -name *.rpm | head -1)
dist=$(rpm -qp --nodigest --nosignature --qf "%{DISTRIBUTION}" $first_rpm | sed -r 's/(.*)\/.*/\1/')
prerelease=0
-if [[ $dist =~ "prerelease" ]]; then
+if ! is_prerelease_project $dist; then
echo "This is a prerelease project. Do not check the existence of source rpm files."
prerelease=1