diff options
| -rw-r--r-- | config-joey.hs | 8 | ||||
| -rw-r--r-- | debian/changelog | 8 | ||||
| -rw-r--r-- | src/Propellor/Property/Apt.hs | 23 |
3 files changed, 31 insertions, 8 deletions
diff --git a/config-joey.hs b/config-joey.hs index e84eb360..466a7f8c 100644 --- a/config-joey.hs +++ b/config-joey.hs @@ -190,17 +190,15 @@ orca = standardSystem "orca.kitenet.net" Unstable "amd64" & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "amd64") Nothing fifteenpast "2h") + (System (Debian Unstable) "amd64") Nothing (Cron.Times "15 * * * *") "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian Unstable) "i386") Nothing fifteenpast "2h") + (System (Debian Unstable) "i386") Nothing (Cron.Times "30 * * * *") "2h") & Systemd.nspawned (GitAnnexBuilder.autoBuilderContainer GitAnnexBuilder.standardAutoBuilder - (System (Debian (Stable "jessie")) "i386") (Just "ancient") fifteenpast "2h") + (System (Debian (Stable "jessie")) "i386") (Just "ancient") (Cron.Times "45 * * * *") "2h") & Systemd.nspawned (GitAnnexBuilder.androidAutoBuilderContainer (Cron.Times "1 1 * * *") "3h") - where - fifteenpast = Cron.Times "15 * * * *" honeybee :: Host honeybee = standardSystem "honeybee.kitenet.net" Testing "armhf" diff --git a/debian/changelog b/debian/changelog index 6d85083b..c5b27741 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +propellor (2.16.1) UNRELEASED; urgency=medium + + * Apt.upgrade: Run dpkg --configure -a first, to recover from + interrupted upgrades. + * Apt: Add safeupgrade. + + -- Joey Hess <id@joeyh.name> Mon, 29 Feb 2016 17:58:08 -0400 + propellor (2.16.0) unstable; urgency=medium * Obnam: Only let one backup job run at a time when a host has multiple diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index f5d08c1d..bb444463 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -123,10 +123,27 @@ update = runApt ["update"] `assume` MadeChange `describe` "apt update" +-- | Have apt upgrade packages, adding new packages and removing old as +-- necessary. upgrade :: Property NoInfo -upgrade = runApt ["-y", "dist-upgrade"] - `assume` MadeChange - `describe` "apt dist-upgrade" +upgrade = upgrade' "dist-upgrade" + +upgrade' :: String -> Property NoInfo +upgrade' p = combineProperties ("apt " ++ p) + [ runApt ["-y", p] + `assume` MadeChange + , dpkgConfigured + ] + +-- | Have apt upgrade packages, but never add new packages or remove +-- old packages. Not suitable for upgrading acrocess major versions +-- of the distribution. +safeUpgrade :: Property NoInfo +safeUpgrade = upgrade' "upgrade" + +dpkgConfigured :: Property NoInfo +dpkgConfigured = cmdProperty "dpkg" ["--confugure", "--pending"] + `describe` "dpkg configured pending" type Package = String |
