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. --- debian/changelog | 3 +++ .../comment_2_d8381b5e727b6e54f8e4a5cd9792e09c._comment | 12 ++++++++++++ src/Propellor/Property/Apt.hs | 17 ++++++++++++++--- 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 doc/forum/apt_releaseinfo/comment_2_d8381b5e727b6e54f8e4a5cd9792e09c._comment diff --git a/debian/changelog b/debian/changelog index 0f51140a..2de322ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ propellor (5.9.1) UNRELEASED; urgency=medium from testing to testing-security. * Apt: Also the suite for stable releases from bullseye on will be suffixed with "-security". + * 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. -- Joey Hess Wed, 10 Jul 2019 22:02:35 -0400 diff --git a/doc/forum/apt_releaseinfo/comment_2_d8381b5e727b6e54f8e4a5cd9792e09c._comment b/doc/forum/apt_releaseinfo/comment_2_d8381b5e727b6e54f8e4a5cd9792e09c._comment new file mode 100644 index 00000000..401271d9 --- /dev/null +++ b/doc/forum/apt_releaseinfo/comment_2_d8381b5e727b6e54f8e4a5cd9792e09c._comment @@ -0,0 +1,12 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 2""" + date="2019-07-16T15:09:57Z" + content=""" +That matches my intuition of it. And propellor's Unstable and Testing +are indeed intended to explicitly request a rolling release. +(I thought that "unstable" and "testing" were also intended to explicitly +request that?) + +Anyway, I've made Apt.update add the new argument for Unstable and Testing. +"""]] 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