Skip to content

Commit 0c2830a

Browse files
committed
rauc: only consider good slots for update notifications
Signed-off-by: Leonard Göhrs <l.goehrs@pengutronix.de>
1 parent dbf3e35 commit 0c2830a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dbus/rauc/update_channels.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,12 +194,14 @@ impl UpstreamBundle {
194194
pub(super) fn update_install(&mut self, slot_status: &SlotStatus) {
195195
let slot_0_is_older = slot_status
196196
.get("rootfs_0")
197+
.filter(|r| r.get("boot_status").map_or(false, |b| b == "good"))
197198
.and_then(|r| r.get("bundle_version"))
198199
.and_then(|v| compare_versions(&self.version, v).map(|c| c.is_gt()))
199200
.unwrap_or(true);
200201

201202
let slot_1_is_older = slot_status
202203
.get("rootfs_1")
204+
.filter(|r| r.get("boot_status").map_or(false, |b| b == "good"))
203205
.and_then(|r| r.get("bundle_version"))
204206
.and_then(|v| compare_versions(&self.version, v).map(|c| c.is_gt()))
205207
.unwrap_or(true);

0 commit comments

Comments
 (0)