From 2932d54e84e81ead996d7ce68a2846c7fb07e0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=B6ser=2C=20Daniel?= Date: Mon, 9 Sep 2024 16:56:38 +0200 Subject: [PATCH] Use dependency flags PRETRANS/POSTTRANS for preTrans/postTrans scriptlet requirements --- .../main/java/org/eclipse/packager/rpm/build/RpmBuilder.java | 4 ++-- .../org/eclipse/packager/rpm/deps/RpmDependencyFlags.java | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/rpm/src/main/java/org/eclipse/packager/rpm/build/RpmBuilder.java b/rpm/src/main/java/org/eclipse/packager/rpm/build/RpmBuilder.java index f8f8b58..c63f8d2 100644 --- a/rpm/src/main/java/org/eclipse/packager/rpm/build/RpmBuilder.java +++ b/rpm/src/main/java/org/eclipse/packager/rpm/build/RpmBuilder.java @@ -1230,7 +1230,7 @@ public void setVerifyScript(final String script) { } public void setPreTransactionScript(final String interpreter, final String script) { - addInterpreterRequirement(interpreter, RpmDependencyFlags.SCRIPT_PREUN); + addInterpreterRequirement(interpreter, RpmDependencyFlags.PRETRANS); setScript(RpmTag.PRETRANSACTION_SCRIPT_PROG, RpmTag.PRETRANSACTION_SCRIPT, interpreter, script); } @@ -1239,7 +1239,7 @@ public void setPreTransactionScript(final String script) { } public void setPostTransactionScript(final String interpreter, final String script) { - addInterpreterRequirement(interpreter, RpmDependencyFlags.SCRIPT_POSTUN); + addInterpreterRequirement(interpreter, RpmDependencyFlags.POSTTRANS); setScript(RpmTag.POSTTRANSACTION_SCRIPT_PROG, RpmTag.POSTTRANSACTION_SCRIPT, interpreter, script); } diff --git a/rpm/src/main/java/org/eclipse/packager/rpm/deps/RpmDependencyFlags.java b/rpm/src/main/java/org/eclipse/packager/rpm/deps/RpmDependencyFlags.java index 7139d2f..7a98650 100644 --- a/rpm/src/main/java/org/eclipse/packager/rpm/deps/RpmDependencyFlags.java +++ b/rpm/src/main/java/org/eclipse/packager/rpm/deps/RpmDependencyFlags.java @@ -20,6 +20,7 @@ public enum RpmDependencyFlags { LESS(1), GREATER(2), EQUAL(3), + POSTTRANS(5), PREREQ(6), PRETRANS(7), INTERPRETER(8),