Files
mvel2/reproducible-date.patch
Fridrich Strba 98eb5d3104 Accepting request 1159151 from home:urbic:branches:Java:packages
- Update to v2.5.2
  * No changelog provided by upstream
- Modify patch:
  * reproducible-date.patch
    + fixed MVEL shell startup error when the SOURCE_DATE_EPOCH
      environment variable is not defined
- Remove build dependency on
  mvn(org.apache.maven.plugins:maven-enforcer-plugin)

OBS-URL: https://build.opensuse.org/request/show/1159151
OBS-URL: https://build.opensuse.org/package/show/Java:packages/mvel2?expand=0&rev=7
2024-03-19 06:52:11 +00:00

11 lines
630 B
Diff

--- a/src/main/java/org/mvel2/sh/DefaultEnvironment.java 2023-06-06 11:22:34.000000000 +0200
+++ b/src/main/java/org/mvel2/sh/DefaultEnvironment.java 2023-09-16 10:44:56.330351904 +0200
@@ -20,6 +20,6 @@
public interface DefaultEnvironment {
public static final String PROMPT =
- "[@{ new java.text.SimpleDateFormat('hh:mmaa').format(new java.util.Date(System.currentTimeMillis()))}] mvel2$ ";
+ "[@{ new java.text.SimpleDateFormat('hh:mmaa').format(System.getenv('SOURCE_DATE_EPOCH') != null ? new java.util.Date(1000 * Long.parseLong(System.getenv('SOURCE_DATE_EPOCH'))) : new java.util.Date())}] mvel2$ ";
}