From 52349a883ca10f0f8ea7a33fe4f8da6b01eb354f Mon Sep 17 00:00:00 2001 From: wanchao-xu Date: Fri, 10 May 2024 11:29:32 +0800 Subject: [PATCH] Fix the distribution of rpm is not compared. Change-Id: I136ac66f20cf110f2f0dd7c040601fbc954f0770 Signed-off-by: wanchao-xu --- packaging/functions.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/packaging/functions.sh b/packaging/functions.sh index bdbbbb4..4756240 100755 --- a/packaging/functions.sh +++ b/packaging/functions.sh @@ -341,12 +341,12 @@ function cmp_rpm_meta () dist=$(check_header "$QF" $newrpm | sed -r 's/(.*)\/.*/\1/') if ! is_prerelease_project $dist; then echo "This is a prerelease project. Do not compare the project name." - QF="\n___QF_DISTURL___\n%{DISTURL}\n___QF_DISTURL___\n" + QF="\n___QF_DISTURL_DISTRIBUTION___\n%{DISTURL}\n___QF_DISTURL_DISTRIBUTION___\n" echo `check_header "$QF" $oldrpm | sed -r 's/.*\/(.*\/.*)/\1/'` >> $rpm_meta_old echo `check_header "$QF" $newrpm | sed -r 's/.*\/(.*\/.*)/\1/'` >> $rpm_meta_new else - QF="\n___QF_DISTURL_DISTRIBUTION___\n%{DISTURL} %{DISTRIBUTION}\n___QF_DISTURL_DISTRIBUTION___\n" echo "This is not a prerelease project. Compare the project name." + QF="\n___QF_DISTURL_DISTRIBUTION___\n%{DISTURL} %{DISTRIBUTION}\n___QF_DISTURL_DISTRIBUTION___\n" check_header "$QF" $oldrpm >> $rpm_meta_old check_header "$QF" $newrpm >> $rpm_meta_new fi @@ -362,6 +362,13 @@ function cmp_rpm_meta () return 1 fi + get_value QF_DISTURL_DISTRIBUTION $rpm_meta_old > $file1 + get_value QF_DISTURL_DISTRIBUTION $rpm_meta_new > $file2 + if ! comp_file disturl_distribution $file1 $file2 $rpm_meta_old $rpm_meta_new; then + rm -rf "$tmpdir" + return 1 + fi + name_new="$(get_value QF_NAME $rpm_meta_new)" version_release_new="$(get_value QF_VER_REL $rpm_meta_new)" name_ver_rel_new="$(get_value QF_NAME_VER_REL $rpm_meta_new)" -- 2.7.4