From cd46d4ebd33e74ee53bbc73dcdb7fe1d4d006558 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Mon, 2 Nov 2015 16:02:44 +0100 Subject: ensure FileFd doesn't try to open /dev/null as atomic and co The wrapping will fail in the best case and actually end up deleting /dev/null in the worst case. Given that there is no point in trying to write atomically to /dev/null as you can't read from it again just ignore these flags if higher level code ends up trying to use them on /dev/null. Git-Dch: Ignore --- test/integration/test-apt-acquire-additional-files | 4 +++ test/libapt/fileutl_test.cc | 30 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'test') diff --git a/test/integration/test-apt-acquire-additional-files b/test/integration/test-apt-acquire-additional-files index 552499ea2..0a9653ce6 100755 --- a/test/integration/test-apt-acquire-additional-files +++ b/test/integration/test-apt-acquire-additional-files @@ -31,6 +31,7 @@ Reading package lists..." aptget update testempty find rootdir/var/lib/apt/lists -name '*Contents*' +msgmsg "Normal Contents file" cat > rootdir/etc/apt/apt.conf.d/content-target.conf <> rootdir/etc/apt/apt.conf.d/content-target.conf testsuccessequal "Hit:1 http://localhost:${APTHTTPPORT} unstable InRelease Get:2 http://localhost:${APTHTTPPORT} unstable/main amd64 Contents [$(stat -c%s aptarchive/dists/unstable/main/Contents-amd64.gz) B] @@ -94,6 +96,7 @@ rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Cont rm ./rootdir/var/lib/apt/lists/localhost:${APTHTTPPORT}_dists_unstable_main_Contents-all.gz testempty aptget indextargets --format '$(FILENAME)' 'Created-By: Contents' +msgmsg "Compressed Contents file" # and no automatic uncompress based on the name please, # only if we downloaded a compressed file, but target was uncompressed cat > rootdir/etc/apt/apt.conf.d/content-target.conf <