From 6168e29b6ee6711f80edc57333bdab444715c621 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Thu, 10 Jul 2025 00:48:50 +0100 Subject: [PATCH] Add duplicate check to openjdk_news.sh Related: RHEL-103211 --- java-21-openjdk.spec | 1 + scripts/openjdk_news.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 6f89007..060e611 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -2476,6 +2476,7 @@ exit 0 - Update release notes to 21.0.8+2 - Sync the copy of the portable specfile with the latest update - Add timezone data update check to openjdk_news.sh +- Add duplicate check to openjdk_news.sh - Related: RHEL-101803 - Related: RHEL-103211 diff --git a/scripts/openjdk_news.sh b/scripts/openjdk_news.sh index a459007..dcce190 100755 --- a/scripts/openjdk_news.sh +++ b/scripts/openjdk_news.sh @@ -69,12 +69,22 @@ do fi done -sort "${TMPDIR}/fixes2" "${TMPDIR}/fixes3" | uniq > "${TMPDIR}/fixes" +sort "${TMPDIR}/fixes2" "${TMPDIR}/fixes3" > "${TMPDIR}/fixes4" +uniq "${TMPDIR}/fixes4" > "${TMPDIR}/fixes" rm -f "${TMPDIR}/fixes2" "${TMPDIR}/fixes3" echo "In ${TMPDIR}/fixes:" cat "${TMPDIR}/fixes" +printf "\nChecking for duplicates..."; +if uniq -d "${TMPDIR}/fixes4" | grep 'JDK' > "${TMPDIR}/dupes"; then + printf "found.\nWARNING: Review the following duplicates:\n"; + cat "${TMPDIR}/dupes"; +else + echo "No apparent duplicates."; +fi +rm -f "${TMPDIR}/fixes4"; + printf "\nChecking for backouts..."; if grep -i 'backout' "${TMPDIR}/fixes" > "${TMPDIR}/backouts"; then printf "found.\nWARNING: Review the following backouts:\n"