@@ -254,25 +254,18 @@ def remove_files(context: Context) -> None:
254254 t .rmdir ()
255255
256256
257- def finalize_packages (config : Config ) -> list [str ]:
258- s = set (config .remove_packages )
259- return [p for p in config .packages if p not in s ]
260-
261-
262257def install_distribution (context : Context ) -> None :
263- packages = finalize_packages (context .config )
264-
265258 if context .config .base_trees :
266- if not packages :
259+ if not context . config . packages :
267260 return
268261
269262 with complete_step (
270263 f"Installing extra packages for { context .config .distribution .installer .pretty_name ()} "
271264 ):
272- context .config .distribution .installer .install_packages (context , packages )
265+ context .config .distribution .installer .install_packages (context , context . config . packages )
273266 else :
274267 if context .config .overlay or context .config .output_format .is_extension_image ():
275- if packages :
268+ if context . config . packages :
276269 die (
277270 "Cannot install packages in extension images without a base tree" ,
278271 hint = "Configure a base tree with the BaseTrees= setting" ,
@@ -307,8 +300,8 @@ def install_distribution(context: Context) -> None:
307300 with umask (~ 0o600 ):
308301 (context .root / "boot/loader/entries.srel" ).write_text ("type1\n " )
309302
310- if packages :
311- context .config .distribution .installer .install_packages (context , packages )
303+ if context . config . packages :
304+ context .config .distribution .installer .install_packages (context , context . config . packages )
312305
313306 for f in (
314307 "var/lib/systemd/random-seed" ,
0 commit comments