[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#238080: xfree86: IGNORE_MANIFEST_CHANGES doesn't work



On Mon, Mar 15, 2004 at 12:04:07AM -0800, Daniel Schepler wrote:
> Package: xfree86
> Severity: minor
> Version: 4.3.0-5
> 
> When I was trying to build a custom version of xfree86 using
> IGNORE_MANIFEST_CHANGES, it didn't work.  The problem appears to be
> that the diff command is returning an exit code of 1 when it finds
> changes, and since dbs sets SHELL to "/bin/sh -e", the rest of the
> command never gets reached.  In fact, adding "|| true" after the diff
> command fixed the problem.  So might adding `|| test "$$?" = 1'
> instead, but I haven't tested that one.

Thanks for the report!

I am testing the following patch:

Index: debian/rules
===================================================================
--- debian/rules	(revision 1144)
+++ debian/rules	(working copy)
@@ -334,15 +334,22 @@
 	# confirm that the installed file list has not changed
 	if [ -e debian/MANIFEST.$(ARCH) ]; then \
 	  if ! cmp -s debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; then \
-	    diff -U 0 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new; \
-	    if [ -n "$$IGNORE_MANIFEST_CHANGES" ]; then \
-	      echo 'MANIFEST check failed; ignoring problem because \$$IGNORE_MANIFEST_CHANGES set' >&2; \
-	      echo 'Please ensure that the package maintainer has an up-to-date version of the' >&2; \
-	      echo 'MANIFEST.$(ARCH) file.' >&2; \
-	    $(ELSE) \
-	      echo 'MANIFEST check failed; please see debian/README' >&2; \
-	      exit 1; \
-	    fi; \
+	    diff -U 0 debian/MANIFEST.$(ARCH) debian/MANIFEST.$(ARCH).new || DIFFSTATUS=$$?; \
+	    case $${DIFFSTATUS:-0} in \
+	      0) ;; \
+	      1) if [ -n "$$IGNORE_MANIFEST_CHANGES" ]; then \
+	           echo 'MANIFEST check failed; ignoring problem because \$$IGNORE_MANIFEST_CHANGES set' >&2; \
+	           echo 'Please ensure that the package maintainer has an up-to-date version of the' >&2; \
+	           echo 'MANIFEST.$(ARCH) file.' >&2; \
+	         $(ELSE) \
+	           echo 'MANIFEST check failed; please see debian/README' >&2; \
+	           exit 1; \
+	         fi; \
+	         ;; \
+	      *) echo "diff reported unexpected exit status $$DIFFSTATUS when performing MANIFEST check" >&2; \
+	         exit 1; \
+	         ;; \
+	    esac; \
 	  fi; \
 	fi;
 else

-- 
G. Branden Robinson                |       Psychology is really biology.
Debian GNU/Linux                   |       Biology is really chemistry.
branden@debian.org                 |       Chemistry is really physics.
http://people.debian.org/~branden/ |       Physics is really math.

Attachment: signature.asc
Description: Digital signature


Reply to: