Vincent Danjean wrote: > I made a patch to correct this on my system. You may want to apply it > upstream (or rewrite it). As for the other parts of the mergechanges > script, it makes assumptions about the order in the changes files...
Of course, my patch had a typo (twice the Checksum-Sha1: entry...) Here is a corrected patch. Best regards Vincent -- Vincent Danjean GPG key ID 0x9D025E87 [EMAIL PROTECTED] GPG key fingerprint: FC95 08A6 854D DB48 4B9A 8A94 0BF7 7867 9D02 5E87 Unofficial pacakges: http://www-id.imag.fr/~danjean/deb.html#package APT repo: deb http://perso.debian.org/~vdanjean/debian unstable main
--- /tmp/mergechanges.orig 2008-04-14 09:25:47.000000000 +0200 +++ /usr/bin/mergechanges 2008-04-14 11:11:17.000000000 +0200 @@ -96,6 +96,10 @@ SOURCE=$(grep -h "^Source: " "$@" | sed -e "s,^Source: ,," | sort -u) # Extract & merge the files from all files FILES=$(egrep -h "^ [0-9a-f]{32} [0-9]+" "$@" | sort -u) +# Extract & merge the Sha1 from all files +SHA1=$(egrep -h "^ [0-9a-f]{40} [0-9]+" "$@" | sort -u) +# Extract & merge the Sha256 from all files +SHA256=$(egrep -h "^ [0-9a-f]{64} [0-9]+" "$@" | sort -u) # Extract & merge the description from all files DESCRIPTIONS=$(sed '/^Description:/,/^[^ ]/{/^ /p;d};d' "$@" | sort -u) @@ -143,14 +147,28 @@ cp "$1" ${OUTPUT} fi -# Replace the Architecture: field, nuke the value of Files:, and insert -# the Description: field before the Changes: field -eval "sed -e 's,^Architecture: .*,Architecture: ${ARCHS},; /^Files: /q' \ +# Replace the Architecture: field, nuke the value of Files:, Checksums-Sha1: +# and/or Checksums-Sha256:, and insert the Description: field before the +# Changes: field +eval "sed -e 's,^Architecture: .*,Architecture: ${ARCHS},; /^\(Files\|Checksums-Sha\(1\|256\)\): /Q' \ -e '/^Description:/,/^[^ ]/{/^Description:/d;/^[ ]/d}' \ -e '/^Changes:/{r '${DESCFILE} -e ';aChanges:' -e ';d}' \ ${OUTPUT} ${REDIR1}" +# Voodoo magic to get the merged Checksums-Sha1 into the output (if any) +if test $(echo "${SHA1}" | wc -l) -ge 1; then + eval "echo 'Checksums-Sha1: ' ${REDIR2}" + eval "echo '${SHA1}' ${REDIR2}" +fi + +# Voodoo magic to get the merged Checksums-Sha256 into the output (if any) +if test $(echo "${SHA256}" | wc -l) -ge 1; then + eval "echo 'Checksums-Sha256: ' ${REDIR2}" + eval "echo '${SHA256}' ${REDIR2}" +fi + # Voodoo magic to get the merged filelist into the output +eval "echo 'Files: ' ${REDIR2}" eval "echo '${FILES}' ${REDIR2}" exit 0