Author: adam-guest
Date: 2008-05-20 17:30:28 +0000 (Tue, 20 May 2008)
New Revision: 1455

Modified:
   trunk/debian/changelog
   trunk/scripts/mergechanges.sh
Log:
mergechanges: Allow changes files with Formats of 1.7 and 1.8 to be merged,
by removing the Checksums-* fields from the Format: 1.8 files. The result
will be a valid Format: 1.7 changes file. (Closes: #481585)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-05-19 19:16:34 UTC (rev 1454)
+++ trunk/debian/changelog      2008-05-20 17:30:28 UTC (rev 1455)
@@ -1,6 +1,8 @@
 devscripts (2.10.29) UNRELEASED; urgency=low
 
-  * NOT RELEASED YET
+  * mergechanges: Allow changes files with Formats of 1.7 and 1.8 to be merged,
+    by removing the Checksums-* fields from the Format: 1.8 files. The result
+    will be a valid Format: 1.7 changes file. (Closes: #481585)
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Mon, 19 May 2008 20:14:38 +0100
 

Modified: trunk/scripts/mergechanges.sh
===================================================================
--- trunk/scripts/mergechanges.sh       2008-05-19 19:16:34 UTC (rev 1454)
+++ trunk/scripts/mergechanges.sh       2008-05-20 17:30:28 UTC (rev 1455)
@@ -131,9 +131,17 @@
 
 # Sanity check #5: Formats must match
 if test $(echo "${FORMATS}" | wc -l) -ne 1; then
-    echo "Error: Changes files have different Format fields:" >&2
-    grep "^Format: " "$@" >&2
-    exit 1
+    if test "${FORMATS}" = "$(printf "1.7\n1.8\n")"; then
+       FORMATS="1.7"
+       CHECKSUMS=""
+       UNSUPCHECKSUMS=""
+       SHA1S=""
+       SHA256S=""
+    else
+       echo "Error: Changes files have different Format fields:" >&2
+       grep "^Format: " "$@" >&2
+       exit 1
+    fi
 fi
 
 # Sanity check #6: The Format must be one we understand
@@ -183,6 +191,7 @@
     -e '/^Files: /,$ d; /^Checksums-.*: /,$ d' \
     -e '/^Description:/,/^[^ ]/{/^Description:/d;/^[ ]/d}' \
     -e '/^Changes:/{r '${DESCFILE} -e ';aChanges:' -e ';d}' \
+    -e 's,^Format: .*,Format: ${FORMATS},' \
     ${OUTPUT} ${REDIR1}"
 
 # Voodoo magic to get the merged file and checksum lists into the output



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to