diff options
Diffstat (limited to 'backend/modules/gentoo_portage/portage.php')
-rw-r--r-- | backend/modules/gentoo_portage/portage.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/backend/modules/gentoo_portage/portage.php b/backend/modules/gentoo_portage/portage.php new file mode 100644 index 0000000..c09d4d7 --- /dev/null +++ b/backend/modules/gentoo_portage/portage.php @@ -0,0 +1,16 @@ +<?php +start_internal_task('Set up portage in image'); +end_internal_task(0); +start_internal_task('Copy portage tree into image'); +foreach (glob("{$S['conf']['portdir']}/*") as $from) { + $file=substr($from, strlen($S['conf']['portdir'])+1); + // Skip distfiles, binary packages, and potential overlay directories + if ($file == 'distfiles' || $file == 'packages' || $file == 'local' || $file == 'overlay') continue; + $cmd="cp -av -t '$I/usr/portage/' '$from'"; + error_get_last(); + @shell_exec($cmd); + log_status("$cmd", !(error_get_last())); +} +log_status("Symlink make.profile -> /usr/portage/profiles/{$headers['profile']}", symlink("/usr/portage/profiles/{$headers['profile']}", "$I/etc/make.profile")); +end_internal_task(0); +?> |