File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ on the target, use
22
22
bootc switch --transport oci /var/mnt/usb/myos.oci
23
23
```
24
24
25
- The above command can only be invoked once currently; thereafter, use ` bootc upgrade `
26
- as normal to fetch updates from the USB device.
25
+ The above command is only necessary once, and thereafter will be idempotent.
26
+ Then, use ` bootc upgrade --apply ` to fetch and apply the update from the USB device.
27
27
28
28
This process can all be automated by creating systemd
29
29
units that look for a USB device with a specific label, mount (optionally with LUKS
Original file line number Diff line number Diff line change @@ -442,7 +442,8 @@ async fn switch(opts: SwitchOpts) -> Result<()> {
442
442
} ;
443
443
444
444
if new_spec == host. spec {
445
- anyhow:: bail!( "No changes in current host spec" ) ;
445
+ println ! ( "Image specification is unchanged." ) ;
446
+ return Ok ( ( ) ) ;
446
447
}
447
448
let new_spec = RequiredHostSpec :: from_spec ( & new_spec) ?;
448
449
Original file line number Diff line number Diff line change @@ -15,10 +15,17 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in
15
15
bootc status > status.txt
16
16
grep ' Version:' status.txt
17
17
bootc status --json > status.json
18
- image=$( jq -r ' .status.booted.image.image' < status.json)
18
+ image=$( jq ' .status.booted.image.image' < status.json)
19
19
echo " booted into $image "
20
20
echo " ok status test"
21
21
22
+ # Switch should be idempotent
23
+ # (also TODO, get rid of the crazy .image.image.image nesting)
24
+ name=$( echo " ${image} " | jq -r ' .image' )
25
+ bootc switch $name
26
+ staged=$( bootc status --json | jq .status.staged)
27
+ test " $staged " = " null"
28
+
22
29
host_ty=$( jq -r ' .status.type' < status.json)
23
30
test " ${host_ty} " = " bootcHost"
24
31
# Now fake things out with an empty /run
You can’t perform that action at this time.
0 commit comments