This commit is contained in:
Joey Hess 2014-04-02 20:40:38 -04:00
parent 73fcd794e4
commit 6bde26780f
2 changed files with 6 additions and 6 deletions

View File

@ -84,6 +84,10 @@ installed ps = robustly $ check (isInstallable ps) go
where
go = runApt $ ["-y", "install"] ++ ps
-- | Minimal install of package, without recommends.
installedMin :: [Package] -> Property
installedMin ps = installed ("--no-install-recommends" : ps)
removed :: [Package] -> Property
removed ps = check (or <$> isInstalled' ps) go
`describe` (unwords $ "apt removed":ps)
@ -100,7 +104,7 @@ buildDep ps = robustly go
-- in the specifed directory, with a dummy package also
-- installed so that autoRemove won't remove them.
buildDepIn :: FilePath -> Property
buildDepIn dir = go `requires` installed ["devscripts"]
buildDepIn dir = go `requires` installedMin ["devscripts"]
where
go = cmdProperty' "sh" ["-c", "cd '" ++ dir ++ "' && mk-build-deps debian/control --install --remove"]
noninteractiveEnv

6
TODO
View File

@ -2,7 +2,6 @@
run it once for the whole. For example, may want to restart apache,
but only once despite many config changes being made to satisfy
properties. onChange is a poor substitute.
* I often seem to want to be able to combine Properties monadically.
* --spin needs 4 ssh connections when bootstrapping a new host
that does not have the git repo yet. Should be possible to get that
down to 1.
@ -12,7 +11,4 @@
* Display of docker container properties is a bit wonky. It always
says they are unchanged even when they changed and triggered a
reprovision.
* Nothing brings up docker containers on boot. Although the next time
propellor runs it will notice if a container is done, and fix it.
Should propellor be run on boot? Or should provisioning a container
install a systemd service file to start it?
* Should properties be a tree rather than a list?