File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -877,6 +877,9 @@ fn require_skopeo_with_containers_storage() -> Result<()> {
877877pub ( crate ) struct RootSetup {
878878 luks_device : Option < String > ,
879879 device_info : crate :: blockdev:: PartitionTable ,
880+ /// True if the rootfs already had /ostree
881+ #[ allow( dead_code) ]
882+ has_ostree : bool ,
880883 rootfs : Utf8PathBuf ,
881884 rootfs_fd : Dir ,
882885 rootfs_uuid : Option < String > ,
@@ -1744,6 +1747,9 @@ pub(crate) async fn install_to_filesystem(
17441747
17451748 let skip_finalize =
17461749 matches ! ( fsopts. replace, Some ( ReplaceMode :: Alongside ) ) || fsopts. skip_finalize ;
1750+ let has_ostree = rootfs_fd
1751+ . try_exists ( "ostree/repo" )
1752+ . context ( "Querying extant ostree repo" ) ?;
17471753 let mut rootfs = RootSetup {
17481754 luks_device : None ,
17491755 device_info,
@@ -1753,6 +1759,7 @@ pub(crate) async fn install_to_filesystem(
17531759 boot,
17541760 kargs,
17551761 skip_finalize,
1762+ has_ostree,
17561763 } ;
17571764
17581765 install_to_filesystem_impl ( & state, & mut rootfs) . await ?;
Original file line number Diff line number Diff line change @@ -428,5 +428,6 @@ pub(crate) fn install_create_rootfs(
428428 boot,
429429 kargs,
430430 skip_finalize : false ,
431+ has_ostree : false , // Must not exist yet
431432 } )
432433}
You can’t perform that action at this time.
0 commit comments