diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2017-11-11 11:48:24 -0700 |
|---|---|---|
| committer | Sean Whitton <spwhitton@spwhitton.name> | 2017-11-11 11:49:05 -0700 |
| commit | 4d3595560faaa9551dcd11e1e19183983b14f37c (patch) | |
| tree | b7487e5d8e34d91c614b3ed785499dc7d69a4d29 /src/Propellor | |
| parent | 8c3d8b1b7ae902a75507473562ce43b5877882a9 (diff) | |
fix type errors
Diffstat (limited to 'src/Propellor')
| -rw-r--r-- | src/Propellor/Property/Sbuild.hs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index 29931722..62c911e3 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -93,11 +93,11 @@ built -> Props metatypes -> RevertableProperty (HasInfo + DebianLike) Linux built cc ps = case schrootSystem ps of - Nothing -> errorMessage - "sbuild schroot does not specify suite and/or architecture" + -- TODO should emit error and FailedChange + Nothing -> doNothing <!> doNothing Just s@(System _ arch) -> case Debootstrap.extractSuite s of - Nothing -> errorMessage - "sbuild schroot does not specify suite" + -- TODO should emit error and FailedChange + Nothing -> doNothing <!> doNothing Just suite -> built' cc ps suite (architectureToDebianArchString arch) where @@ -135,19 +135,18 @@ built' cc ps suite arch = provisioned <!> deleted where desc = "no sbuild schroot for " ++ suiteArch - conf suite arch = map pair - [ ("description", (suite ++ "/" ++ arch ++ " autobuilder")) - , ("groups", "root,sbuild") - , ("root-groups", "root,sbuild") - , ("profile", "sbuild") - , ("type", "directory") - , ("directory", schrootRoot) - -- TODO conditionalise (fold into overlayKernels prop?) - , ("union-type", "overlay") - , ("command-prefix", (intercalate "," commandPrefix)) - ] + conf suite arch = propertyList "sbuild config file" $ props + & pair "description" (suite ++ "/" ++ arch ++ " autobuilder") + & pair "groups" "root,sbuild" + & pair "root-groups" "root,sbuild" + & pair "profile" "sbuild" + & pair "type" "directory" + & pair "directory" schrootRoot + -- TODO conditionalise (fold into overlayKernels prop?) + & pair "union-type" "overlay" + & pair "command-prefix" (intercalate "," commandPrefix) where - pair (k, v) = ConfFile.containsIniSetting schrootConf + pair k v = ConfFile.containsIniSetting schrootConf (suiteArch ++ "-sbuild", k, v) compatSymlink = File.isSymlinkedTo @@ -416,4 +415,5 @@ sidHostArchSchroot suite arch = do return $ case maybeOS of Nothing -> False Just (System _ hostArch) -> - suite == "unstable" && hostArch == arch + let hostArch' = architectureToDebianArchString hostArch + in suite == "unstable" && hostArch' == arch |
