diff options
author | Julian Andres Klode <jak@debian.org> | 2016-09-07 13:23:26 +0200 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2016-09-07 14:00:37 +0200 |
commit | c382e0dff11beb00632d67d9361831358a38e465 (patch) | |
tree | 9eabf0cf15bba2f27ec4da8daeb512a186c349ab /test | |
parent | 12b201da7c1d5e2beceae796151e4ebedc5bae97 (diff) | |
download | apt-c382e0dff11beb00632d67d9361831358a38e465.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/framework | 4 |
1 files changed, 4 insertions, 0 deletions
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 |