commit 495823642b01a60b38827d6527b89ad8cbd86738
Author: Michal Srb <msrb(a)redhat.com>
Date: Wed Jun 10 15:24:48 2015 +0200
Macro %add_maven_depmap should fail if given JAR file doesn't exist
(rhbz#1230193)
macros.d/macros.fjava | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/macros.d/macros.fjava b/macros.d/macros.fjava
index 73f51df..bb419ae 100644
--- a/macros.d/macros.fjava
+++ b/macros.d/macros.fjava
@@ -181,12 +181,17 @@ set -e \
%endif \
_filelist=".mfiles%{-f*:-%{-f*}}" \
install -dm 755 %{buildroot}%{_datadir}/maven-metadata \
+_jbase= \
+_jpath= \
for _dir in %{_jnidir} %{_javadir}; do \
if [ -f %{buildroot}$_dir/$_jarpart ]; then \
_jbase="%{buildroot}$_dir" \
_jpath="$_jbase/$_jarpart" \
fi \
done \
+%if %# != 1 \
+ [ -z "$_jpath" ] && (echo "%0 error: $_jarpart - file not
found" 1>&2; exit 1) \
+%endif \
%{pyinterpreter} %{javadir}-utils/maven_depmap.py %{-a} %{-v*:-r %{-v*}} \\\
-n "%{?scl}" \\\
--pom-base %{buildroot}%{_mavenpomdir} \\\
Show replies by date