summaryrefslogtreecommitdiff
path: root/src/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2019-07-16 11:12:52 -0400
committerJoey Hess2019-07-16 11:12:52 -0400
commitcd4cd311903a41bea565311efe56aebb7ba20c34 (patch)
tree6b8f6cf55d98d6b45e774da077b9bac8a67602a6 /src/Propellor/Property
parent680da90c69f60444186cb02aa66e62609023c1c8 (diff)
Apt.update: Pass --allow-releaseinfo-change when updating Unstable or Testing
So that code name changes that happen in those suites during a stable release don't prevent updating the rolling suites.
Diffstat (limited to 'src/Propellor/Property')
-rw-r--r--src/Propellor/Property/Apt.hs17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs
index bc190e59..4faf0984 100644
--- a/src/Propellor/Property/Apt.hs
+++ b/src/Propellor/Property/Apt.hs
@@ -214,10 +214,21 @@ noninteractiveEnv =
-- | Have apt update its lists of packages, but without upgrading anything.
update :: Property DebianLike
-update = combineProperties ("apt update") $ props
+update = combineProperties desc $ props
& pendingConfigured
- & runApt ["update"]
- `assume` MadeChange
+ & aptupdate
+ where
+ desc = "apt update"
+ aptupdate :: Property DebianLike
+ aptupdate = withOS desc $ \w o -> case o of
+ (Just (System (Debian _ suite) _))
+ | not (isStable suite) -> ensureProperty w $
+ -- rolling suites' release info can change
+ runApt ["update", "--allow-releaseinfo-change"]
+ `assume` MadeChange
+ _ -> ensureProperty w $
+ runApt ["update"]
+ `assume` MadeChange
-- | Have apt upgrade packages, adding new packages and removing old as
-- necessary. Often used in combination with the `update` property.