From 7bad15c69c8baef6965db2d296e5b5175670af6a Mon Sep 17 00:00:00 2001 From: "Brian J. Murrell" Date: Tue, 7 Jun 2011 14:10:25 -0400 Subject: [PATCH] LU-400 don't unroll empty commits into patches The patch unrolling tool, build/extract_patches, currently will create an empty dpatch if a commit is empty. This causes dpatch some heartburn, so just skip empty commits. Signed-off-by: Brian J. Murrell Change-Id: Ice0e5fad3c1dd01b507838a8b449536d016b8ffb Reviewed-on: http://review.whamcloud.com/908 Reviewed-by: Johann Lombardi Tested-by: Hudson --- build/autoMakefile.am.toplevel | 3 ++- build/extract_patches | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/autoMakefile.am.toplevel b/build/autoMakefile.am.toplevel index e161125..e55cb0a 100644 --- a/build/autoMakefile.am.toplevel +++ b/build/autoMakefile.am.toplevel @@ -107,7 +107,8 @@ EXTRA_DIST = @PACKAGE_TARNAME@.spec \ build/autoconf/lustre-build-darwin.m4 \ build/autoconf/lustre-build.m4 build/rdac_spec \ build/mptlinux.spec.patch build/patches \ - build/funcs.sh build/find_linux_rpms build/exit_traps.sh + build/funcs.sh build/find_linux_rpms build/exit_traps.sh \ + build/extract_patches rpms-real: @PACKAGE_TARNAME@.spec dist Makefile CONFIGURE_ARGS=$$(echo $$(eval echo $(ac_configure_args)) | sed -re 's/--(en|dis)able-tests//'); \ diff --git a/build/extract_patches b/build/extract_patches index 9c5c5d2..de88c07 100755 --- a/build/extract_patches +++ b/build/extract_patches @@ -33,7 +33,7 @@ if [ $ffw -gt 0 ]; then mkdir ../patched rm -f 00list *.dpatch for file in [0-9][0-9][0-9][0-9]-*.patch; do - if ! grep -q "^--- a/debian/" $file; then + if [ -s $file ] && ! grep -q "^--- a/debian/" $file; then desc=$(cat $file | sed -e '1,/^$/d' \ -e '/^---$/,$d') dpatch_file=${file/.patch/.dpatch} -- 1.8.3.1