Skip to content

Commit

Permalink
Merge branch 'topic/okurth/add-build-mounts' into 'master'
Browse files Browse the repository at this point in the history
add 'build_mounts' option

See merge request core-build/photon-os-installer!100
  • Loading branch information
Oliver Kurth committed Nov 6, 2024
2 parents d79aaed + 591e27a commit d17dd2d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions photon_installer/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Installer(object):
'arch',
'autopartition',
'bootmode',
'build_mounts',
'disk',
'disks',
'docker',
Expand Down Expand Up @@ -732,6 +733,7 @@ def _unsafe_install(self):
self._setup_install_repo()
self._initialize_system()
self._mount_special_folders()
self._build_mounts()
self._execute_modules(modules.commons.PRE_PKGS_INSTALL)
self._install_packages()
self._install_additional_rpms()
Expand Down Expand Up @@ -1261,6 +1263,15 @@ def _mount_special_folders(self):
self._mount('tmpfs', d, fstype='tmpfs')


def _build_mounts(self):
if 'build_mounts' not in self.install_config:
return

build_mounts = self.install_config['build_mounts']
for src, dst in build_mounts.items():
self._mount(src, dst, bind=True, create=True)


def _copy_additional_files(self):
if 'additional_files' in self.install_config:
for filetuples in self.install_config['additional_files']:
Expand Down

0 comments on commit d17dd2d

Please sign in to comment.