From 5faa18a5b7b166c420423e587b595d25a539a52d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 27 Jul 2017 09:17:25 -0400 Subject: DiskImage: Fix strictness bug in .parttable read/write sequence. --- debian/changelog | 1 + src/Propellor/Property/DiskImage.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 8fc67343..502e5630 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ propellor (4.6.1) UNRELEASED; urgency=medium additional options for interfaces files. * Fix build failure on ghc-8.2.1 Thanks, Sergei Trofimovich. + * DiskImage: Fix strictness bug in .parttable read/write sequence. -- Joey Hess Wed, 26 Jul 2017 23:40:48 -0400 diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index 55ccad76..c68a99e6 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -284,7 +284,7 @@ imageExists' img parttable = (setup cleanup) `describe` desc desc = "disk image exists " ++ img parttablefile = img ++ ".parttable" setup = property' desc $ \w -> do - oldparttable <- liftIO $ catchDefaultIO "" $ readFile parttablefile + oldparttable <- liftIO $ catchDefaultIO "" $ readFileStrict parttablefile res <- ensureProperty w $ imageExists img (partTableSize parttable) if res == NoChange && oldparttable == show parttable then return NoChange -- cgit v1.3-2-g0d8e