diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 2e913540..15c45629 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -297,3 +297,11 @@ aptKeyFile k = "/etc/apt/trusted.gpg.d" </> keyname k ++ ".gpg" cacheCleaned :: Property NoInfo cacheCleaned = trivial $ cmdProperty "apt-get" ["clean"] `describe` "apt cache cleaned" + +-- | Add a foreign architecture to dpkg and apt. +hasForeignArch :: String -> Property NoInfo +hasForeignArch arch = check notAdded add + `describe` ("dpkg has foreign architecture " ++ arch) + where + notAdded = (not . elem arch . lines) <$> readProcess "dpkg" ["--print-foreign-architectures"] + add = cmdProperty "dpkg" ["--add-architecture", arch] `before` update |
