From e7c7adc0c4cdc838eada045334b038c7f01dcc56 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 7 Mar 2016 21:51:25 -0400 Subject: add unsupportedOS --- src/Propellor/Property/Apt.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Propellor/Property/Apt.hs') diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index eae56ab5..7301a6ae 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -160,16 +160,14 @@ installed' params ps = robustly $ check (isInstallable ps) go installedBackport :: [Package] -> Property NoInfo installedBackport ps = withOS desc $ \o -> case o of - Nothing -> error "cannot install backports; os not declared" (Just (System (Debian suite) _)) -> case backportSuite suite of - Nothing -> notsupported o + Nothing -> unsupportedOS Just bs -> ensureProperty $ runApt (["install", "-t", bs, "-y"] ++ ps) `changesFile` dpkgStatus - _ -> notsupported o + _ -> unsupportedOS where desc = unwords ("apt installed backport":ps) - notsupported o = error $ "backports not supported on " ++ show o -- | Minimal install of package, without recommends. installedMin :: [Package] -> Property NoInfo -- cgit v1.2.3