@@ -640,9 +640,6 @@ checkout_deployment_tree (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeploy
640640 if (!glnx_opendirat (osdeploy_dfd , checkout_target_name , TRUE, & ret_deployment_dfd , error ))
641641 return FALSE;
642642
643- guint64 composefs_start_time = 0 ;
644- guint64 composefs_end_time = 0 ;
645- #ifdef HAVE_COMPOSEFS
646643 /* TODO: Consider changing things in the future to parse the deployment config from memory, and
647644 * if composefs is enabled, then we can check out in "user mode" (i.e. only have suid binaries
648645 * enabled in composefs, etc.)
@@ -667,7 +664,11 @@ checkout_deployment_tree (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeploy
667664 g_debug ("composefs enabled by config: %d repo: %d" , composefs_enabled , repo -> composefs_wanted );
668665 if (repo -> composefs_wanted == OT_TRISTATE_YES )
669666 composefs_enabled = repo -> composefs_wanted ;
670- if (composefs_enabled == OT_TRISTATE_YES )
667+
668+ guint64 composefs_start_time = 0 ;
669+ guint64 composefs_end_time = 0 ;
670+ #ifdef HAVE_COMPOSEFS
671+ if (composefs_enabled != OT_TRISTATE_NO )
671672 {
672673 composefs_start_time = g_get_monotonic_time ();
673674 // TODO: Clean up our mess around composefs/fsverity...we have duplication
@@ -694,6 +695,9 @@ checkout_deployment_tree (OstreeSysroot *sysroot, OstreeRepo *repo, OstreeDeploy
694695 }
695696 else
696697 g_debug ("not using composefs" );
698+ #else
699+ if (composefs_enabled == OT_TRISTATE_YES )
700+ return glnx_throw (error , "composefs: enabled at runtime, but support is not compiled in" );
697701#endif
698702
699703 * checkout_elapsed = (checkout_end_time - checkout_start_time );
0 commit comments