fix the issue that system/runtime overlays are not auto-rebuilt

Signed-off-by: xu yang <xyang@ciq.com>
This commit is contained in:
xu yang
2024-06-19 09:31:32 +00:00
parent 630156d514
commit 170d03e751
3 changed files with 22 additions and 18 deletions

View File

@@ -127,9 +127,10 @@ func OverlayInit(overlayName string) error {
Build the given overlays for a node and create a Image for them
*/
func BuildOverlay(nodeInfo node.NodeInfo, context string, overlayNames []string) error {
if len(overlayNames) == 0 {
if len(overlayNames) == 0 && context == "" {
return nil
}
// create the dir where the overlay images will reside
name := fmt.Sprintf("overlay %s/%v", nodeInfo.Id.Get(), overlayNames)
overlayImage := OverlayImage(nodeInfo.Id.Get(), context, overlayNames)