summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton2016-05-20 05:53:54 +0900
committerSean Whitton2016-05-20 05:54:58 +0900
commite603748f9752bbef2eb1a1bd82a36f3afda0986d (patch)
treec94a3356854c88f8832cfaecca3a14103c0dbfd1
parent2a1f6a6d65771f045d1a56a0f698782122525284 (diff)
fix bracketing and type errors
-rw-r--r--src/Propellor/Property/Sbuild.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs
index 0890bc3f..8c507bd8 100644
--- a/src/Propellor/Property/Sbuild.hs
+++ b/src/Propellor/Property/Sbuild.hs
@@ -85,7 +85,7 @@ data SbuildSchroot = SbuildSchroot Suite Architecture
builtFor :: System -> RevertableProperty DebianLike UnixLike
builtFor system = case schrootFromSystem system of
Just s -> built s (stdMirror system)
- Nothing -> errorMessage "don't know how to debootstrap " ++ show system
+ Nothing -> errorMessage ("don't know how to debootstrap " ++ show system)
-- | Build and configure a schroot for use with sbuild
built :: SbuildSchroot -> Apt.Url -> RevertableProperty DebianLike UnixLike
@@ -130,19 +130,20 @@ built s@(SbuildSchroot suite arch) mirror = built <!> deleted
updatedFor :: System -> Property DebianLike
updatedFor system = case schrootFromSystem system of
Just s -> updated s
- Nothing -> errorMessage "don't know how to debootstrap " ++ show system
+ Nothing -> errorMessage ("don't know how to debootstrap " ++ show system)
-- | Ensure that an sbuild schroot's packages and apt indexes are updated
updated :: SbuildSchroot -> Property DebianLike
updated s@(SbuildSchroot suite arch) =
- check (doesDirectoryExist (schrootRoot s)) $
- property ("updated schroot for " ++ show s) go
+ check (doesDirectoryExist (schrootRoot s)) $ go
+ `describe` ("updated schroot for " ++ show s)
`requires` keypairGenerated
`requires` installed
where
go :: Property DebianLike
go = tightenTargets $ cmdProperty
"sbuild-update" ["-udr", suite ++ "-" ++ arch]
+ `assume` MadeChange
-- Find the conf file that sbuild-createchroot(1) made when we passed it
-- --chroot-suffix=propellor, and edit and rename such that it is as if we
@@ -156,7 +157,7 @@ updated s@(SbuildSchroot suite arch) =
-- given suite and architecture, so we don't need the suffix to be random.
fixConfFile :: SbuildSchroot -> IO ()
fixConfFile s@(SbuildSchroot suite arch) = do
- old <- take 1 . filter (tempPrefix `isPrefixOf`) <$> dirContents dir
+ old <- concat . filter (tempPrefix `isPrefixOf`) <$> dirContents dir
ensureProperty $ File.fileProperty "replace dummy suffix" (map munge) old
moveFile old new
where