diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-09 23:05:23 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-09 23:05:23 -0400 |
| commit | 1799f634d89f588eeaef6ff2f6226adf5add3389 (patch) | |
| tree | 3ce786ddcf197ff00a4521fff93801ecfba9c3a4 /src/Propellor/Property/Apt.hs | |
| parent | 7755a45da8fc21dc3597e4b74c80b55a16e7fc79 (diff) | |
| parent | ea29beecfeebf304e544ab588da43fa66d83fd43 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Apt.hs')
| -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 |
