Commit 5b10e096 authored by Bernhard Link's avatar Bernhard Link

[testsuite] tests/genpackage.sh: workaround for different dpkg-genchanges

As the amount of spacing in multi-line fields and the order of files in
Files: produced by dpkg-genchanges differs between wheezy and jessie,
add some magic so that wheezy's output looks more like current dpkg's,
so that the testsuite has better chances to run on wheezy, too.
parent 8730c831
......@@ -58,7 +58,11 @@ for pkg in `grep '^Package: ' debian/control | sed -e 's/^Package: //'` ; do
fi
dpkg --build debian/tmp ..
done
#dpkg-genchanges > ../"${PACKAGE}_$VERSION$REVISION"_abbacus.changes
dpkg-genchanges "$@" > ../"$OUTPUT"
dpkg-genchanges "$@" > "$OUTPUT".pre
# simulate dpkg-genchanges behaviour currently in sid so the testsuite runs for backports, too
awk 'BEGIN{inheader=0} /^Files:/ || (inheader && /^ /) {inheader = 1; next} {inheader = 0 ; print}' "$OUTPUT".pre | sed -e 's/ \+$//' >../"$OUTPUT"
echo "Files:" >> ../"$OUTPUT"
awk 'BEGIN{inheader=0} (inheader && /^ .*\.deb$/) {print ; next} /^Files:/ || (inheader && /^ /) {inheader = 1; next} {inheader = 0 ;next}' "$OUTPUT".pre >>../"$OUTPUT"
awk 'BEGIN{inheader=0} /^Files:/ || (inheader && /^ .*\.deb$/) {inheader = 1 ; next } (inheader && /^ /) {print ; next} {inheader = 0 ;next}' "$OUTPUT".pre >>../"$OUTPUT"
cd ..
rm -r "$DIR"
......@@ -49,7 +49,14 @@ dpkg-source -b documentation-9876AD ""
cd documentation-9876AD
fakeroot make -f debian/rules binary-indep > ../documentation_9876AD_coal+all.log
dpkg-genchanges > ../test.changes
OUTPUT=test.changes
dpkg-genchanges > "$OUTPUT".pre
# simulate dpkg-genchanges behaviour currently in sid so the testsuite runs for backports, too
awk 'BEGIN{inheader=0} /^Files:/ || (inheader && /^ /) {inheader = 1; next} {inheader = 0 ; print}' "$OUTPUT".pre | sed -e 's/ \+$//' >../"$OUTPUT"
echo "Files:" >> ../"$OUTPUT"
awk 'BEGIN{inheader=0} (inheader && /^ .*\.deb$/) {print ; next} /^Files:/ || (inheader && /^ /) {inheader = 1; next} {inheader = 0 ;next}' "$OUTPUT".pre >>../"$OUTPUT"
awk 'BEGIN{inheader=0} (inheader && /^ .*\.txt$/) {print ; next} /^Files:/ || (inheader && /^ /) {inheader = 1; next} {inheader = 0 ;next}' "$OUTPUT".pre >>../"$OUTPUT"
awk 'BEGIN{inheader=0} /^Files:/ || (inheader && /^ .*\.(deb|txt)$/) {inheader = 1 ; next } (inheader && /^ /) {print ; next} {inheader = 0 ;next}' "$OUTPUT".pre >>../"$OUTPUT"
cd ..
rm -r documentation-9876AD
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment