File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -384,17 +384,26 @@ async fn upgrade(opts: UpgradeOpts) -> Result<()> {
384
384
crate :: status:: get_status_require_booted ( sysroot) ?;
385
385
let imgref = host. spec . image . as_ref ( ) ;
386
386
// If there's no specified image, let's be nice and check if the booted system is using rpm-ostree
387
- if imgref. is_none ( )
388
- && host
387
+ if imgref. is_none ( ) {
388
+ let booted_incompatible = host
389
389
. status
390
390
. booted
391
391
. as_ref ( )
392
- . map_or ( false , |b| b. incompatible )
393
- {
394
- return Err ( anyhow:: anyhow!(
395
- "Booted deployment contains local rpm-ostree modifications; cannot upgrade via bootc. You can run `rpm-ostree reset` to undo the modifications."
396
- ) ) ;
392
+ . map_or ( false , |b| b. incompatible ) ;
393
+
394
+ let staged_incompatible = host
395
+ . status
396
+ . staged
397
+ . as_ref ( )
398
+ . map_or ( false , |b| b. incompatible ) ;
399
+
400
+ if booted_incompatible || staged_incompatible {
401
+ return Err ( anyhow:: anyhow!(
402
+ "Deployment contains local rpm-ostree modifications; cannot upgrade via bootc. You can run `rpm-ostree reset` to undo the modifications."
403
+ ) ) ;
404
+ }
397
405
}
406
+
398
407
let spec = RequiredHostSpec :: from_spec ( & host. spec ) ?;
399
408
let booted_image = host
400
409
. status
You can’t perform that action at this time.
0 commit comments