rpms/redhat-rpm-config/devel brp-java-repack-jars, 1.3, 1.4 redhat-rpm-config.spec, 1.36, 1.37

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Sep 12 22:24:33 UTC 2006


Author: dbhole

Update of /cvs/dist/rpms/redhat-rpm-config/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv20582

Modified Files:
	brp-java-repack-jars redhat-rpm-config.spec 
Log Message:

Fix brp-java-repack-jars to work with builddirs that aren't %name-%version




Index: brp-java-repack-jars
===================================================================
RCS file: /cvs/dist/rpms/redhat-rpm-config/devel/brp-java-repack-jars,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- brp-java-repack-jars	11 Sep 2006 19:25:05 -0000	1.3
+++ brp-java-repack-jars	12 Sep 2006 22:24:31 -0000	1.4
@@ -42,16 +42,23 @@
 
 		# Get the modtime from the newest ChangeLog. If the project
 		# doesn't have a ChangeLog, Jan 1, 1970 will be used.
-		CHANGELOGS=`find $RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION -type f -name ChangeLog`
 		DATE="1970-01-01 UTC"
-		if [ ! -z "$CHANGELOGS" ]; then
-			for c in $CHANGELOGS; do
-				TMPDATE=`stat -c %y $c | cut -d " " -f 1-2`
-				if [ `date --date="$TMPDATE" +%s` -gt `date --date="$DATE" +%s` ]; then
-					DATE="$TMPDATE"
-				fi
-			done
-		fi 
+
+		if [ -z $_PACKAGE_BUILD_DIR ]; then
+			_PACKAGE_BUILD_DIR=$RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
+		fi
+
+		if [ -d $_PACKAGE_BUILD_DIR ]; then
+			CHANGELOGS=`find $_PACKAGE_BUILD_DIR -type f -name ChangeLog`
+			if [ ! -z "$CHANGELOGS" ]; then
+				for c in $CHANGELOGS; do
+					TMPDATE=`stat -c %y $c | cut -d " " -f 1-2`
+					if [ `date --date="$TMPDATE" +%s` -gt `date --date="$DATE" +%s` ]; then
+						DATE="$TMPDATE"
+					fi
+				done
+			fi 
+		fi
 
 		# move the contents over to the a new directory in order and set
 		# the times. 
@@ -66,7 +73,13 @@
 
 		# make the jar
 		pushd $JARDIR > /dev/null
-		find . -type f -print | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
+
+		if [ -n "`find -type f`" ]; then
+			find -type f -print | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
+		else
+			# Put the empty jar back
+			touch $j
+		fi
 		popd > /dev/null
 
 		# Cleanup.


Index: redhat-rpm-config.spec
===================================================================
RCS file: /cvs/dist/rpms/redhat-rpm-config/devel/redhat-rpm-config.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- redhat-rpm-config.spec	11 Sep 2006 19:25:05 -0000	1.36
+++ redhat-rpm-config.spec	12 Sep 2006 22:24:31 -0000	1.37
@@ -1,7 +1,7 @@
 Summary: Red Hat specific rpm configuration files.
 Name: redhat-rpm-config
 Version: 8.0.45
-Release: 5
+Release: 6
 License: GPL
 Group: Development/System
 Source: redhat-rpm-config-%{version}.tar.gz
@@ -40,6 +40,9 @@
 %{_prefix}/lib/rpm/redhat
 
 %changelog
+* Tue Sep 12 2006 Deepak Bhole <dbhole at redhat.com> 8.0.45-6
+- Fix brp-java-repack-jars to work with builddirs that aren't %name-%version
+
 * Mon Sep 11 2006 Fernando Nasser <fnasser at redhat.com> - 8.0.45-5
 - Fix order of tokens in find command (thanks mikeb at redhat.com)
 




More information about the fedora-cvs-commits mailing list