Skip to content

Commit 434936e

Browse files
committed
[OPENJDK-528] rework singleton-jdk to use a single RPM transaction
This prevents a bug where stray empty directories from JDK packages remain after removal. Signed-off-by: Jonathan Dowland <[email protected]>
1 parent 8c31612 commit 434936e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

modules/singleton-jdk/configure.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,4 @@ fi
1313

1414
# Clean up any java-* packages that have been installed that do not match
1515
# our stated JAVA_VERSION-JAVA_VENDOR (e.g.: 11-openjdk; 1.8.0-openj9)
16-
rpm -qa java-\* | while read pkg; do
17-
if ! echo "$pkg" | grep -q "^java-${JAVA_VERSION}-${JAVA_VENDOR}"; then
18-
rpm -e --nodeps "$pkg"
19-
fi
20-
done
16+
rpm -e --nodeps $(rpm -qa java-* | grep -v "^java-${JAVA_VERSION}-${JAVA_VENDOR}")

0 commit comments

Comments
 (0)