pub struct UpdateFileDiff {
pub role: String,
pub esp_path: String,
pub current_sha256: Option<String>,
pub current_error: Option<String>,
pub fresh_sha256: Option<String>,
pub fresh_error: Option<String>,
pub would_change: bool,
}Expand description
Per-file diff row between what’s currently on the stick’s ESP
and what a fresh mkusb / direct-install flash would write.
One row per canonical ESP destination (see
direct_install::ESP_DEST_*).
Semantics of the hash/error pairs:
current_sha256isNonewhen the ESP file couldn’t be read (file absent,mtypemissing, permission denied); in that casecurrent_errorcarries the operator-facing reason.fresh_sha256isNonewhen the host-side source couldn’t be hashed (package not installed, kernel glob missed, etc);fresh_errorcarries the reason.would_changeis the Phase-1 verdict the operator cares about:trueonly when both hashes are present AND they differ. When either hash is absent the comparison is inconclusive andwould_changeisfalse— the operator sees the error field and knows the answer isn’t “yes it would change”, it’s “we couldn’t tell”.
Added in UPDATE_SCHEMA_VERSION = 2 (Phase 1 of #181).
Fields§
§role: StringRole in the signed chain: shim, grub, grub_cfg_boot,
grub_cfg_ubuntu, kernel, initrd. One entry per
canonical destination (the two grub.cfg targets get
separate rows because mkusb.sh writes both).
esp_path: StringDestination path on the ESP, e.g. /EFI/BOOT/BOOTX64.EFI
(no :: mtools prefix — stripped for consumers that want
an operator-readable path).
current_sha256: Option<String>Lowercase hex sha256 of the file currently on the stick’s
ESP. None when unreadable.
current_error: Option<String>Operator-readable error explaining why current_sha256
is absent. None when the read succeeded.
fresh_sha256: Option<String>Lowercase hex sha256 of what a fresh flash would install.
None when the host-side source couldn’t be hashed.
fresh_error: Option<String>Operator-readable error explaining why fresh_sha256 is
absent. None when the hash succeeded.
would_change: booltrue when both hashes are present and differ. false
when they match, OR when either hash is absent (see struct
docs for the rationale).
Trait Implementations§
Source§impl Clone for UpdateFileDiff
impl Clone for UpdateFileDiff
Source§fn clone(&self) -> UpdateFileDiff
fn clone(&self) -> UpdateFileDiff
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UpdateFileDiff
impl Debug for UpdateFileDiff
Source§impl<'de> Deserialize<'de> for UpdateFileDiff
impl<'de> Deserialize<'de> for UpdateFileDiff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for UpdateFileDiff
impl JsonSchema for UpdateFileDiff
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more