From: Thanh Ha Date: Wed, 12 Sep 2018 17:48:19 +0000 (-0400) Subject: Fix package list script to not fail on diff X-Git-Tag: v0.24.1~1 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F12559%2F1;p=releng%2Fglobal-jjb.git Fix package list script to not fail on diff The diff command exits 1 if there is a difference between 2 files. This is perfectly valid so ignore the exit code for this command. Change-Id: I0da9d6bb99a5a0a9666697b27416fa5e5518e316 Signed-off-by: Thanh Ha --- diff --git a/releasenotes/notes/pkg-diff-non-zero-exit-0fe20690c0210b6d.yaml b/releasenotes/notes/pkg-diff-non-zero-exit-0fe20690c0210b6d.yaml new file mode 100644 index 00000000..4956f746 --- /dev/null +++ b/releasenotes/notes/pkg-diff-non-zero-exit-0fe20690c0210b6d.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix package listing script in post-builder from causing UNSTABLE build due + to difference in the two files being compared. diff --git a/shell/package-listing.sh b/shell/package-listing.sh index b2afe33a..82ee902b 100644 --- a/shell/package-listing.sh +++ b/shell/package-listing.sh @@ -49,7 +49,8 @@ esac if ( [ -f "${START_PACKAGES}" ] && [ -f "${END_PACKAGES}" ] ) then - diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}" + # ` || true` Ignore exit code because diff exits 1 when there is a diff + diff "${START_PACKAGES}" "${END_PACKAGES}" > "${DIFF_PACKAGES}" || true fi # If running in a Jenkins job, then copy the created files to the archives