File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -112,10 +112,13 @@ fn boot_entry_from_deployment(
112
112
) -> Result < BootEntry > {
113
113
let repo = & sysroot. repo ( ) ;
114
114
let ( image, incompatible) = if let Some ( origin) = deployment. origin ( ) . as_ref ( ) {
115
- if let Some ( image) = get_image_origin ( origin) ? {
115
+ let incompatible = crate :: utils:: origin_has_rpmostree_stuff ( origin) ;
116
+ let image = if incompatible {
117
+ // If there are local changes, we can't represent it as a bootc compatible image.
118
+ None
119
+ } else if let Some ( image) = get_image_origin ( origin) ? {
116
120
let image = ImageReference :: from ( image) ;
117
121
let csum = deployment. csum ( ) ;
118
- let incompatible = crate :: utils:: origin_has_rpmostree_stuff ( origin) ;
119
122
let imgstate = ostree_container:: store:: query_image_commit ( repo, & csum) ?;
120
123
let config = imgstate. configuration . as_ref ( ) ;
121
124
let labels = config. and_then ( labels_of_config) ;
@@ -129,18 +132,16 @@ fn boot_entry_from_deployment(
129
132
let version = config
130
133
. and_then ( ostree_container:: version_for_config)
131
134
. map ( ToOwned :: to_owned) ;
132
- (
133
- Some ( ImageStatus {
134
- image,
135
- version,
136
- timestamp,
137
- image_digest : imgstate. manifest_digest ,
138
- } ) ,
139
- incompatible,
140
- )
135
+ Some ( ImageStatus {
136
+ image,
137
+ version,
138
+ timestamp,
139
+ image_digest : imgstate. manifest_digest ,
140
+ } )
141
141
} else {
142
- ( None , false )
143
- }
142
+ None
143
+ } ;
144
+ ( image, incompatible)
144
145
} else {
145
146
( None , false )
146
147
} ;
You can’t perform that action at this time.
0 commit comments