@@ -664,14 +664,11 @@ def kiwi_derived_from_entry(self) -> str:
664664
665665 @property
666666 def packages (self ) -> str :
667- """The list of packages joined so that it can be appended to a
668- :command:`zypper install`.
669-
670- """
667+ """The packages list so that it can be appended to a :command:`zypper install`."""
671668 packages_to_install : list [str ] = []
672669 for pkg in self .package_list :
673670 if isinstance (pkg , Package ):
674- if pkg .pkg_type == PackageType .DELETE :
671+ if pkg .pkg_type in ( PackageType .DELETE , PackageType . BOOTSTRAP ) :
675672 continue
676673 if pkg .pkg_type != PackageType .IMAGE :
677674 raise ValueError (
@@ -680,9 +677,19 @@ def packages(self) -> str:
680677 packages_to_install .append (str (pkg ))
681678 return " " .join (packages_to_install )
682679
680+ @property
681+ def packages_to_bootstrap (self ) -> str :
682+ """The packages list that is installed in the first stage in a multi stage image."""
683+ packages : list [str ] = [
684+ str (pkg )
685+ for pkg in self .package_list
686+ if (isinstance (pkg , Package ) and pkg .pkg_type == PackageType .BOOTSTRAP )
687+ ]
688+ return " " .join (packages )
689+
683690 @property
684691 def packages_to_delete (self ) -> str :
685- """The list of packages joined that can be passed to zypper -n rm after an install`."""
692+ """The packages list that can be passed to zypper -n rm after an install`."""
686693 packages_to_delete : list [str ] = [
687694 str (pkg )
688695 for pkg in self .package_list
@@ -1068,6 +1075,8 @@ async def write_files_to_folder(self, dest: str) -> list[str]:
10681075
10691076 self .prepare_template ()
10701077
1078+ os .makedirs (dest , mode = 0o755 , exist_ok = True )
1079+
10711080 async def write_file_to_dest (fname : str , contents : str | bytes ) -> None :
10721081 await write_to_file (os .path .join (dest , fname ), contents )
10731082
@@ -1459,8 +1468,6 @@ def generate_disk_size_constraints(size_gb: int) -> str:
14591468"""
14601469
14611470
1462- from dotnet .updater import DOTNET_CONTAINERS # noqa: E402
1463-
14641471from .apache_tomcat import TOMCAT_CONTAINERS # noqa: E402
14651472from .appcontainers import ALERTMANAGER_CONTAINERS # noqa: E402
14661473from .appcontainers import BLACKBOX_EXPORTER_CONTAINERS # noqa: E402
@@ -1480,6 +1487,7 @@ def generate_disk_size_constraints(size_gb: int) -> str:
14801487from .basecontainers import MINIMAL_CONTAINERS # noqa: E402
14811488from .bind import BIND_CONTAINERS # noqa: E402
14821489from .cosign import COSIGN_CONTAINERS # noqa: E402
1490+ from .dotnet import DOTNET_CONTAINERS # noqa: E402
14831491from .firefox import FIREFOX_CONTAINERS # noqa: E402
14841492from .gcc import GCC_CONTAINERS # noqa: E402
14851493from .git import GIT_CONTAINERS # noqa: E402
0 commit comments