From cd4cd311903a41bea565311efe56aebb7ba20c34 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Jul 2019 11:12:52 -0400 Subject: 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. --- src/Propellor/Property/Apt.hs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src') 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. -- cgit v1.2.3