diff options
| -rw-r--r-- | debian/changelog | 2 | ||||
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index c7cfb81a..0f1bc9ba 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ propellor (4.8.0) UNRELEASED; urgency=medium image. * Borg: Fix broken shell escaping in borg cron job. * Attic: Fix broken shell escaping in attic cron job. + * Apt.isInstalled: Fix handling of packages that are not known at all + to apt. -- Joey Hess <id@joeyh.name> Thu, 24 Aug 2017 11:00:19 -0400 diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 5630d83a..68ebe89e 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -331,7 +331,9 @@ isInstalled :: Package -> IO Bool isInstalled p = isInstalled' [p] isInstalled' :: [Package] -> IO Bool -isInstalled' ps = all (== IsInstalled) <$> getInstallStatus ps +isInstalled' ps = do + is <- getInstallStatus ps + return $ all (== IsInstalled) is && length is == length ps data InstallStatus = IsInstalled | NotInstalled deriving (Show, Eq) |
