Fix package list script to not fail on diff 59/12559/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 12 Sep 2018 17:48:19 +0000 (13:48 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 12 Sep 2018 17:55:16 +0000 (13:55 -0400)
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 <thanh.ha@linuxfoundation.org>
releasenotes/notes/pkg-diff-non-zero-exit-0fe20690c0210b6d.yaml [new file with mode: 0644]
shell/package-listing.sh

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 (file)
index 0000000..4956f74
--- /dev/null
@@ -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.
index b2afe33..82ee902 100644 (file)
@@ -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