From: Julian Andres Klode Date: Wed, 7 Sep 2016 11:23:26 +0000 (+0200) Subject: test: framework: Ensure copied status files have trailing lines X-Git-Tag: 1.3~7 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/c382e0dff11beb00632d67d9361831358a38e465 test: framework: Ensure copied status files have trailing lines If we copied one of the existing status files, we might not have a trailing newline, so let's add one. Gbp-Dch: ignore --- diff --git a/test/integration/framework b/test/integration/framework index 067cc6e8a..c5b752e18 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -525,6 +525,10 @@ configdpkg() { local STATUSFILE="status-${BASENAME#*-}" if [ -f "${TESTDIRECTORY}/${STATUSFILE}" ]; then cp "${TESTDIRECTORY}/${STATUSFILE}" rootdir/var/lib/dpkg/status + # Add an empty line to the end if there is none + if tail -1 rootdir/var/lib/dpkg/status | grep -q .; then + echo >> rootdir/var/lib/dpkg/status + fi else echo -n > rootdir/var/lib/dpkg/status fi