-# check that we really can install from a 'cdrom'
-testdpkgnotinstalled testing
-testsuccess aptget install testing -y
-testdpkginstalled testing
+# ensure cdrom method isn't trying to mount the cdrom
+mv rootdir/media/cdrom-unmounted rootdir/media/cdrom-ejected
+msgmsg "ensure an update doesn't mess with cdrom sources"
+testsuccess aptget update
+testfileequal rootdir/tmp/testsuccess.output 'Hit:1 cdrom://Debian APT Testdisk 0.8.15 stable InRelease
+Reading package lists...'
+mv rootdir/media/cdrom-ejected rootdir/media/cdrom-unmounted
+testcdromusage
+
+msgmsg 'and again to check that it withstands the temptation even if it could mount'
+testsuccess aptget update
+testfileequal rootdir/tmp/testsuccess.output 'Hit:1 cdrom://Debian APT Testdisk 0.8.15 stable InRelease
+Reading package lists...'
+testcdromusage
+
+msgmsg 'Check that nothing touched our' 'CD-ROM'
+for file in $(find rootdir/media/cdrom-unmounted/dists); do
+ testfilestats "$file" '%U:%G:%a' '=' "${TEST_DEFAULT_USER}:${TEST_DEFAULT_GROUP}:555"
+done