Skip to content

Commit

Permalink
bootloader: Fix filename issue for loader configs
Browse files Browse the repository at this point in the history
We used `.extension` APIs and that implicitly removed the old
desktop suffix... and our new suffix for the TX ID! This now
fixes that part which is part of our story now for enabling
rollbacks using an fstx.

Signed-off-by: Ikey Doherty <[email protected]>
  • Loading branch information
ikeycode committed Jan 2, 2025
1 parent 67f1f12 commit 989b6af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions blsforme/src/bootloader/systemd_boot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ impl<'a, 'b> Loader<'a, 'b> {
.boot_root
.join_insensitive("loader")
.join_insensitive("entries")
.join_insensitive(entry.id(self.schema))
.with_extension("conf");
.join_insensitive(format!("{}.conf", entry.id(self.schema)));
log::trace!("writing entry: {}", loader_id.display());

// vmlinuz primary path
Expand Down
2 changes: 1 addition & 1 deletion blsforme/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ impl<'a> Entry<'a> {
Schema::Legacy { os_release, .. } => os_release.name.clone(),
Schema::Blsforme { os_release } => os_release.id.clone(),
};
if let Some(state_id) = self.state_id {
if let Some(state_id) = self.state_id.as_ref() {
format!("{id}-{version}-{state_id}", version = &self.kernel.version)
} else {
format!("{id}-{version}", version = &self.kernel.version)
Expand Down

0 comments on commit 989b6af

Please sign in to comment.