mirror of
https://github.com/containers/bootc.git
synced 2026-02-06 00:45:22 +01:00
Drop rpm-ostree from statefile path
Now that this is split out.
This commit is contained in:
@@ -24,7 +24,7 @@ mod util;
|
||||
|
||||
/// Stored in /boot to describe our state; think of it like
|
||||
/// a tiny rpm/dpkg database.
|
||||
pub(crate) const STATEFILE_PATH: &str = "boot/rpmostree-bootupd-state.json";
|
||||
pub(crate) const STATEFILE_PATH: &str = "boot/bootupd-state.json";
|
||||
|
||||
/// Where rpm-ostree rewrites data that goes in /boot
|
||||
pub(crate) const OSTREE_BOOT_DATA: &str = "usr/lib/ostree-boot";
|
||||
|
||||
23
src/model.rs
23
src/model.rs
@@ -108,7 +108,6 @@ pub(crate) struct SavedPendingUpdate {
|
||||
pub(crate) timestamp: NaiveDateTime,
|
||||
}
|
||||
|
||||
/// Will be serialized into /boot/rpmostree-bootupd-state.json
|
||||
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub(crate) struct SavedComponent {
|
||||
@@ -119,23 +118,23 @@ pub(crate) struct SavedComponent {
|
||||
pub(crate) pending: Option<SavedPendingUpdate>,
|
||||
}
|
||||
|
||||
/// Will be serialized into /boot/rpmostree-bootupd-state.json
|
||||
/// Will be serialized into /boot/bootupd-state.json
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub(crate) struct SavedState {
|
||||
pub(crate) components: BTreeMap<ComponentType, SavedComponent>,
|
||||
}
|
||||
|
||||
/// Should be stored in /usr/lib/rpm-ostree/bootupdate-edge.json
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[serde(rename_all = "kebab-case")]
|
||||
pub(crate) struct UpgradeEdge {
|
||||
/// Set to true if we should upgrade from an unknown state
|
||||
#[serde(default)]
|
||||
pub(crate) from_unknown: bool,
|
||||
/// Upgrade from content past this timestamp
|
||||
pub(crate) from_timestamp: Option<NaiveDateTime>,
|
||||
}
|
||||
// Should be stored in /usr/lib/bootupd/edges.json
|
||||
//#[derive(Serialize, Deserialize, Debug)]
|
||||
// #[serde(rename_all = "kebab-case")]
|
||||
// pub(crate) struct UpgradeEdge {
|
||||
// /// Set to true if we should upgrade from an unknown state
|
||||
// #[serde(default)]
|
||||
// pub(crate) from_unknown: bool,
|
||||
// /// Upgrade from content past this timestamp
|
||||
// pub(crate) from_timestamp: Option<NaiveDateTime>,
|
||||
// }
|
||||
|
||||
impl InstalledContent {
|
||||
pub(crate) fn from_file_tree(ft: FileTree) -> InstalledContent {
|
||||
|
||||
@@ -113,7 +113,7 @@ assert_file_has_content_literal out.txt 'Update: At latest version'
|
||||
ok 'adoption status'
|
||||
|
||||
# Re-initialize and adopt with extra state
|
||||
rm -v root/boot/rpmostree-bootupd-state.json
|
||||
rm -v root/boot/bootupd-state.json
|
||||
initefiroot "${bootefi}"
|
||||
initefiroot "${ostefi}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user