From 7d259eee4bee16a32dc6fbb67700d491fa844a1c Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Mon, 23 Jul 2012 18:37:28 +0200 Subject: [PATCH] Run redundant dependency checks only in mock --- maven-script-rpmbuild | 13 ++++++++++--- maven.spec | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/maven-script-rpmbuild b/maven-script-rpmbuild index aabab06..f50b2f1 100644 --- a/maven-script-rpmbuild +++ b/maven-script-rpmbuild @@ -33,8 +33,15 @@ function help() # add maven.repo.local if it's not defined already local_add="-Dmaven.repo.local=$(pwd)/.m2/" -log_file="$(umask 2 && mktemp -t mvn-rpmbuild.$$.XXXXXXXXXX)" -logfile_add="-Dmaven.resolver.logfile=$log_file" +# Check whether we are ran in mock +# FIXME: is there a better way to do this? +mock=test +test "$HOME" = /builddir && mock=: + +if $mock; then + log_file="$(umask 2 && mktemp -t mvn-rpmbuild.$$.XXXXXXXXXX)" + logfile_add="-Dmaven.resolver.logfile=$log_file" +fi function process_args() { @@ -69,7 +76,7 @@ export JAVA_HOME export MAVEN_OPTS="$MAVEN_OPTS -Dmaven.local.mode ${local_add} ${logfile_add}" $M2_HOME/bin/mvn -o "$@" || exit $? - +$mock || exit sanitize() { for obj in $1; do diff --git a/maven.spec b/maven.spec index 518ef89..c3aa72c 100644 --- a/maven.spec +++ b/maven.spec @@ -2,7 +2,7 @@ Name: maven Version: 3.0.4 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Java project management and project comprehension tool Group: Development/Tools @@ -367,6 +367,9 @@ ln -sf `rpm --eval '%%{_jnidir}'` %{_datadir}/%{name}/repository-jni/JPP %changelog +* Mon Jul 23 2012 Mikolaj Izdebski - 3.0.4-9 +- Run redundant dependency checks only in mock + * Tue Jul 17 2012 Mikolaj Izdebski - 3.0.4-8 - Add manual page