File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -314,13 +314,22 @@ def process_meta(
314314
315315 if added_files :
316316 # Only add if it has files to prevent wasting layers
317+ dedicated = contents .get ("dedicated" , True )
318+
319+ if dedicated and total_size < 5e6 :
320+ # Some times, a KDE image will include a single gnome package
321+ # Which will make rechunk make a dedicated layer for it.
322+ # Force disable dedicated layers if the size is too small.
323+ logger .warning (f"Meta package '{ name } ' is too small ({ total_size } < 2MB). Disabling dedicated layer." )
324+ dedicated = False
325+
317326 npkg = MetaPackage (
318327 index = len (new_packages ),
319328 name = name ,
320329 nevra = tuple (meta_packages .keys ()),
321330 size = total_size ,
322331 updates = tuple (meta_updates ),
323- dedicated = contents . get ( " dedicated" , True ) ,
332+ dedicated = dedicated ,
324333 meta = True ,
325334 )
326335 if npkg .name == "unpackaged" :
You can’t perform that action at this time.
0 commit comments