Skip to content

Commit

Permalink
Merge pull request #783 from cgwalters/drop-rpm-at-install
Browse files Browse the repository at this point in the history
main: Don't use package system to query our own version
  • Loading branch information
cgwalters authored Nov 21, 2024
2 parents b71403c + 67cb23d commit 045f792
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bootupd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::efi;
use crate::model::{ComponentStatus, ComponentUpdatable, ContentMetadata, SavedState, Status};
use crate::util;
use anyhow::{anyhow, Context, Result};
use clap::crate_version;
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
use std::collections::BTreeMap;
Expand Down Expand Up @@ -96,7 +97,12 @@ pub(crate) fn install(

match configs.enabled_with_uuid() {
Some(uuid) => {
let self_meta = crate::packagesystem::query_files("/", ["/usr/bin/bootupctl"])?;
let self_bin_meta =
std::fs::metadata("/proc/self/exe").context("Querying self meta")?;
let self_meta = ContentMetadata {
timestamp: self_bin_meta.modified()?.into(),
version: crate_version!().into(),
};
state.static_configs = Some(self_meta);
#[cfg(any(
target_arch = "x86_64",
Expand Down

0 comments on commit 045f792

Please sign in to comment.