From 3edcf564bc8f41a13a1ed9be4b1cc40976cf6527 Mon Sep 17 00:00:00 2001 From: Eudyptula Date: Mon, 10 Aug 2009 16:48:30 -0400 Subject: Major backend reorganization - moved much of backend.php into build class, reformated bundlers to be the same format as modules, fixed build status tracking to be properly resumable throughout the process (except stages that create files that get in their own way); etc. --- backend/backend.php | 93 ++++++++------------------ backend/bundlers/cd-common.php | 6 ++ backend/bundlers/cd-head.php | 8 +++ backend/bundlers/cd.inc | 12 ---- backend/bundlers/ext2.php | 12 ---- backend/bundlers/ext2/bundle.php | 6 ++ backend/bundlers/ext2/cp.php | 6 ++ backend/bundlers/ext2/mkfs.php | 4 ++ backend/bundlers/ext2/tar.php | 3 + backend/bundlers/installcd.php | 8 --- backend/bundlers/installcd/assemble.php | 4 ++ backend/bundlers/installcd/bundle.php | 6 ++ backend/bundlers/installcd/cd-common.php | 1 + backend/bundlers/installcd/cd-head.php | 1 + backend/bundlers/jffs2.php | 6 -- backend/bundlers/jffs2/bundle.php | 4 ++ backend/bundlers/jffs2/mkfs.php | 3 + backend/bundlers/livecd.php | 9 --- backend/bundlers/livecd/assemble.php | 4 ++ backend/bundlers/livecd/bundle.php | 7 ++ backend/bundlers/livecd/cd-common.php | 1 + backend/bundlers/livecd/cd-head.php | 1 + backend/bundlers/livecd/livecd-tools.php | 3 + backend/bundlers/tbz2.php | 6 -- backend/bundlers/tbz2/bundle.php | 4 ++ backend/bundlers/tbz2/tar.php | 3 + backend/bundlers/tgz.php | 6 -- backend/bundlers/tgz/bundle.php | 4 ++ backend/bundlers/tgz/tar.php | 3 + backend/functions/api.php | 1 - backend/functions/signals.php | 4 +- backend/include/includes.php | 4 -- backend/modules/gentoo_portage/base-system.php | 2 +- backend/modules/gentoo_portage/build.php | 8 +-- backend/modules/gentoo_portage/hostname.php | 2 +- backend/modules/gentoo_portage/init.d.php | 2 +- backend/modules/gentoo_portage/portage.php | 10 +-- backend/modules/gentoo_portage/setup.php | 10 +-- backend/modules/gentoo_portage/timezone.php | 6 +- 39 files changed, 130 insertions(+), 153 deletions(-) create mode 100644 backend/bundlers/cd-common.php create mode 100644 backend/bundlers/cd-head.php delete mode 100644 backend/bundlers/cd.inc delete mode 100644 backend/bundlers/ext2.php create mode 100644 backend/bundlers/ext2/bundle.php create mode 100644 backend/bundlers/ext2/cp.php create mode 100644 backend/bundlers/ext2/mkfs.php create mode 100644 backend/bundlers/ext2/tar.php delete mode 100644 backend/bundlers/installcd.php create mode 100644 backend/bundlers/installcd/assemble.php create mode 100644 backend/bundlers/installcd/bundle.php create mode 120000 backend/bundlers/installcd/cd-common.php create mode 120000 backend/bundlers/installcd/cd-head.php delete mode 100644 backend/bundlers/jffs2.php create mode 100644 backend/bundlers/jffs2/bundle.php create mode 100644 backend/bundlers/jffs2/mkfs.php delete mode 100644 backend/bundlers/livecd.php create mode 100644 backend/bundlers/livecd/assemble.php create mode 100644 backend/bundlers/livecd/bundle.php create mode 120000 backend/bundlers/livecd/cd-common.php create mode 120000 backend/bundlers/livecd/cd-head.php create mode 100644 backend/bundlers/livecd/livecd-tools.php delete mode 100644 backend/bundlers/tbz2.php create mode 100644 backend/bundlers/tbz2/bundle.php create mode 100644 backend/bundlers/tbz2/tar.php delete mode 100644 backend/bundlers/tgz.php create mode 100644 backend/bundlers/tgz/bundle.php create mode 100644 backend/bundlers/tgz/tar.php delete mode 100644 backend/include/includes.php (limited to 'backend') diff --git a/backend/backend.php b/backend/backend.php index 2874b1a..161b7b2 100755 --- a/backend/backend.php +++ b/backend/backend.php @@ -50,7 +50,7 @@ require_once(SHARED.'/include/dbinit.php'); while (true) { // TODO check first for builds that need to be resumed (and figure out how to resume things) while (true) { - $r=query('SELECT * FROM `builds` WHERE `backend`="'.$S['conf']['backend_id'].'" AND `status` IN ("queued","cancel","uploading","upload_failed","building","got_signal") ORDER BY `ctime` ASC LIMIT 1'); + $r=query('SELECT * FROM `builds` WHERE `backend`="'.$S['conf']['backend_id'].'" AND `status` IN ("queued","cancel","uploading","building","bundling") AND `failed`!="true" ORDER BY `ctime` ASC LIMIT 1'); if ($r->rowCount()) break; else { @@ -60,76 +60,37 @@ while (true) { } } $build=new sql_build($r->fetch(PDO::FETCH_ASSOC)); - if (!isset($build->start)) { - $build->start=time(); - $build->write(); - } debug('Starting build id='.$build->id); $file=null; $owner=$build->get_owner(); - $workdir=WORK."/build-$build->id"; - if (($image=$build->build($workdir)) !== false) { - try { - $bundler=$build->get_opt('bundler'); - $bundle_proc="bundle_$bundler"; - if (!function_exists($bundle_proc)) - throw_exception("No bundler function defined for bundler $bundler"); - $opts=$build->get_opts(); - $file=$bundle_proc($image, $workdir, $opts); - end_internal_task(0); // Just in case - } catch (Exception $e) { - log_msg('Caught exception: '.$e->getMessage()); - end_internal_task(1); - $build->status='failed'; - $build->write(); - xhtmlemail('"'.$owner->name.'" <'.$owner->email.'>', null, $S['conf']['title'].' build failed', 'Your build has failed in bundling stage. You can find more information at id").'">'.url("build/$build->id").''); - } - $build->finish=time(); - debug('Finished with build id='.$build->id); - if (isset($file)) { - debug("Completed build successfully"); - if ($S['conf']['split_setup']) { - $build->status='uploading'; - $build->write(); - $key=randstring(30); - $build->set_opt('uploadkey', $key); - $c=curl_init(url('backend/upload_image')); - curl_setopt($c, CURLOPT_POST, 1); - curl_setopt($c, CURLOPT_POSTFIELDS, array( - 'build' => $build->id, - 'key' => $key, - 'file' => "@$file" - )); - curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); - $result=curl_exec($c); - if ($S['conf']['debug'] && is_string($result)) { - debug($result); - } - if ($result === false || strpos($result, 'Upload successful') === false) { - $build->status='upload_failed'; - $build->write(); - } else { - debug("Transferred $file... unlinking it"); - unlink($file); - $build->status='complete'; - $build->write(); - shell_exec('rm -rf '.escapeshellarg($workdir)); - } - } else { - $build->status='complete'; - $base=basename($file); - $ext=substr($base, strpos($base, '.')); - rename($file, COMPLETED.'/build-'.$build->id.$ext); - $build->write(); - shell_exec('rm -rf '.escapeshellarg($workdir)); - } - xhtmlemail('"'.$owner->name.'" <'.$owner->email.'>', null, $S['conf']['title'].' build finished', 'Your build has completed successfully. You can find more information and download the completed image at id").'">'.url("build/$build->id").''); - } - } else { - $build->status='failed'; + $workdir=WORK."/$build->id"; + if ($build->status == 'cancel') { + shell_exec('rm -rf '.escapeshellarg($workdir)); + $build->status='canceled'; $build->write(); - xhtmlemail('"'.$owner->name.'" <'.$owner->email.'>', null, $S['conf']['title'].' build failed', 'Your build has failed. You can find more information at id").'">'.url("build/$build->id").''); + continue; + } + if (isset($build->finish)) + $build->finish=null; + elseif (!isset($build->start)) + $build->start=time(); + $build->write(); + $success=$imagedir=$build->build($workdir); + if ($success && !$build->is_canceled()) { + $success=$file=$build->bundle($imagedir, $workdir); + if ($success && !$build->is_canceled()) { + $success=$build->upload($file); + } + } + if ($success) { + debug("Completed build successfully"); + execute_non_vital_command('Delete work directory', 'rm -rf '.escapeshellarg($workdir)); + $build->status='complete'; } + $build->finish=time(); + $build->write(); + debug('Finished with build id='.$build->id); + xhtmlemail('"'.$owner->name.'" <'.$owner->email.'>', null, $S['conf']['title'].' build finished', 'Your build has '.($success?'completed successfully':'failed').'. You can find more information and download the completed image at id").'">'.url("build/$build->id").''); unset($build); } ?> diff --git a/backend/bundlers/cd-common.php b/backend/bundlers/cd-common.php new file mode 100644 index 0000000..0a7f3fb --- /dev/null +++ b/backend/bundlers/cd-common.php @@ -0,0 +1,6 @@ + diff --git a/backend/bundlers/cd-head.php b/backend/bundlers/cd-head.php new file mode 100644 index 0000000..2e96bba --- /dev/null +++ b/backend/bundlers/cd-head.php @@ -0,0 +1,8 @@ +get_headers(); +if (strpos($headers['chost'], 'x86_64') === false) + $minimaliso=CACHE.'/cd/install-x86-minimal-20090623.iso'; +else + $minimaliso=CACHE.'/cd/install-amd64-minimal-20090625.iso'; +?> diff --git a/backend/bundlers/cd.inc b/backend/bundlers/cd.inc deleted file mode 100644 index 6fb5aac..0000000 --- a/backend/bundlers/cd.inc +++ /dev/null @@ -1,12 +0,0 @@ -get_headers(); -if (strpos($headers['chost'], 'x86_64') === false) - $minimaliso=CACHE.'/cd/install-x86-minimal-20090623.iso'; -else - $minimaliso=CACHE.'/cd/install-amd64-minimal-20090625.iso'; -makedir("$I/boot"); -execute_command('Extract kernel, initrd, and squashfs from CD image ', LIB."/bkisofs-cli '$minimaliso' extract /isolinux/gentoo '$I/boot/kernel' extract /isolinux/gentoo.igz '$I/boot/initrd' extract /image.squashfs '$W/'"); -//file_put_contents("$W/unsquashfs-files", "/lib64/modules\n/lib/modules\n"); -execute_command('Extract kernel modules from SquashFS to image', "unsquashfs -i -d '$W/modules' '$W/image.squashfs' /lib/modules /lib64/modules; cp -avT '$W/modules' '$I'; rm -rf '$W/modules'"); -?> diff --git a/backend/bundlers/ext2.php b/backend/bundlers/ext2.php deleted file mode 100644 index 239b5bb..0000000 --- a/backend/bundlers/ext2.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/backend/bundlers/ext2/bundle.php b/backend/bundlers/ext2/bundle.php new file mode 100644 index 0000000..2418453 --- /dev/null +++ b/backend/bundlers/ext2/bundle.php @@ -0,0 +1,6 @@ + diff --git a/backend/bundlers/ext2/cp.php b/backend/bundlers/ext2/cp.php new file mode 100644 index 0000000..befbd91 --- /dev/null +++ b/backend/bundlers/ext2/cp.php @@ -0,0 +1,6 @@ + diff --git a/backend/bundlers/ext2/mkfs.php b/backend/bundlers/ext2/mkfs.php new file mode 100644 index 0000000..925c93f --- /dev/null +++ b/backend/bundlers/ext2/mkfs.php @@ -0,0 +1,4 @@ + diff --git a/backend/bundlers/ext2/tar.php b/backend/bundlers/ext2/tar.php new file mode 100644 index 0000000..5e51e1d --- /dev/null +++ b/backend/bundlers/ext2/tar.php @@ -0,0 +1,3 @@ + diff --git a/backend/bundlers/installcd.php b/backend/bundlers/installcd.php deleted file mode 100644 index 63ffb5a..0000000 --- a/backend/bundlers/installcd.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/backend/bundlers/installcd/assemble.php b/backend/bundlers/installcd/assemble.php new file mode 100644 index 0000000..c4cedc0 --- /dev/null +++ b/backend/bundlers/installcd/assemble.php @@ -0,0 +1,4 @@ + diff --git a/backend/bundlers/installcd/bundle.php b/backend/bundlers/installcd/bundle.php new file mode 100644 index 0000000..384490e --- /dev/null +++ b/backend/bundlers/installcd/bundle.php @@ -0,0 +1,6 @@ + diff --git a/backend/bundlers/installcd/cd-common.php b/backend/bundlers/installcd/cd-common.php new file mode 120000 index 0000000..70f9287 --- /dev/null +++ b/backend/bundlers/installcd/cd-common.php @@ -0,0 +1 @@ +../cd-common.php \ No newline at end of file diff --git a/backend/bundlers/installcd/cd-head.php b/backend/bundlers/installcd/cd-head.php new file mode 120000 index 0000000..8a38a03 --- /dev/null +++ b/backend/bundlers/installcd/cd-head.php @@ -0,0 +1 @@ +../cd-head.php \ No newline at end of file diff --git a/backend/bundlers/jffs2.php b/backend/bundlers/jffs2.php deleted file mode 100644 index c8e5de2..0000000 --- a/backend/bundlers/jffs2.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/backend/bundlers/jffs2/bundle.php b/backend/bundlers/jffs2/bundle.php new file mode 100644 index 0000000..de198a6 --- /dev/null +++ b/backend/bundlers/jffs2/bundle.php @@ -0,0 +1,4 @@ + diff --git a/backend/bundlers/jffs2/mkfs.php b/backend/bundlers/jffs2/mkfs.php new file mode 100644 index 0000000..bf9e702 --- /dev/null +++ b/backend/bundlers/jffs2/mkfs.php @@ -0,0 +1,3 @@ + diff --git a/backend/bundlers/livecd.php b/backend/bundlers/livecd.php deleted file mode 100644 index 740c72b..0000000 --- a/backend/bundlers/livecd.php +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/backend/bundlers/livecd/assemble.php b/backend/bundlers/livecd/assemble.php new file mode 100644 index 0000000..0371103 --- /dev/null +++ b/backend/bundlers/livecd/assemble.php @@ -0,0 +1,4 @@ + diff --git a/backend/bundlers/livecd/bundle.php b/backend/bundlers/livecd/bundle.php new file mode 100644 index 0000000..465404b --- /dev/null +++ b/backend/bundlers/livecd/bundle.php @@ -0,0 +1,7 @@ + diff --git a/backend/bundlers/livecd/cd-common.php b/backend/bundlers/livecd/cd-common.php new file mode 120000 index 0000000..70f9287 --- /dev/null +++ b/backend/bundlers/livecd/cd-common.php @@ -0,0 +1 @@ +../cd-common.php \ No newline at end of file diff --git a/backend/bundlers/livecd/cd-head.php b/backend/bundlers/livecd/cd-head.php new file mode 120000 index 0000000..8a38a03 --- /dev/null +++ b/backend/bundlers/livecd/cd-head.php @@ -0,0 +1 @@ +../cd-head.php \ No newline at end of file diff --git a/backend/bundlers/livecd/livecd-tools.php b/backend/bundlers/livecd/livecd-tools.php new file mode 100644 index 0000000..13132a3 --- /dev/null +++ b/backend/bundlers/livecd/livecd-tools.php @@ -0,0 +1,3 @@ + diff --git a/backend/bundlers/tbz2.php b/backend/bundlers/tbz2.php deleted file mode 100644 index ee69825..0000000 --- a/backend/bundlers/tbz2.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/backend/bundlers/tbz2/bundle.php b/backend/bundlers/tbz2/bundle.php new file mode 100644 index 0000000..6024c3e --- /dev/null +++ b/backend/bundlers/tbz2/bundle.php @@ -0,0 +1,4 @@ + diff --git a/backend/bundlers/tbz2/tar.php b/backend/bundlers/tbz2/tar.php new file mode 100644 index 0000000..2aead89 --- /dev/null +++ b/backend/bundlers/tbz2/tar.php @@ -0,0 +1,3 @@ + diff --git a/backend/bundlers/tgz.php b/backend/bundlers/tgz.php deleted file mode 100644 index 3b604d3..0000000 --- a/backend/bundlers/tgz.php +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/backend/bundlers/tgz/bundle.php b/backend/bundlers/tgz/bundle.php new file mode 100644 index 0000000..b283ee7 --- /dev/null +++ b/backend/bundlers/tgz/bundle.php @@ -0,0 +1,4 @@ + diff --git a/backend/bundlers/tgz/tar.php b/backend/bundlers/tgz/tar.php new file mode 100644 index 0000000..09fbf0c --- /dev/null +++ b/backend/bundlers/tgz/tar.php @@ -0,0 +1,3 @@ + diff --git a/backend/functions/api.php b/backend/functions/api.php index d8d648c..cffbf65 100644 --- a/backend/functions/api.php +++ b/backend/functions/api.php @@ -57,7 +57,6 @@ function log_msg($msg, $nl=true) { if (!isset($task)) { start_internal_task($msg); debug('log_msg creating task... this is bad'); - return; } $msg.=$nl?"\n":''; debug($msg); diff --git a/backend/functions/signals.php b/backend/functions/signals.php index 70231c7..62f5fe3 100644 --- a/backend/functions/signals.php +++ b/backend/functions/signals.php @@ -5,6 +5,7 @@ function handle_signal($sig=null) { unlink($pidfile); if (isset($build)) { if (isset($task)) { + log_msg("\nGot signal $sig\n"); $task->finish=time(); $task->exit=-$sig; $task->write(); @@ -13,10 +14,7 @@ function handle_signal($sig=null) { debug('$task not set'); } $build->finish=time(); - $build->status='got_signal'; - $build->details=$sig; $build->write(); - debug("build $build->id given status $build->status"); } debug("\nGot signal $sig - exiting"); exit; diff --git a/backend/include/includes.php b/backend/include/includes.php deleted file mode 100644 index d20c3ac..0000000 --- a/backend/include/includes.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/backend/modules/gentoo_portage/base-system.php b/backend/modules/gentoo_portage/base-system.php index c99447e..0c730e9 100644 --- a/backend/modules/gentoo_portage/base-system.php +++ b/backend/modules/gentoo_portage/base-system.php @@ -1,6 +1,6 @@ stage3; -execute_command('Unpack base system', "tar -xvjpf '$file' -C '$I'"); +execute_command('Unpack base system', "tar -xvjpf '$file' -C '$imagedir'"); if ($opts['basesystem'] == 'user_prune' && $opts['prunepkgs']) { emerge($opts['prunepkgs'], 'Prune base system packages', '-C'); } elseif ($opts['basesystem'] == 'auto_prune') { diff --git a/backend/modules/gentoo_portage/build.php b/backend/modules/gentoo_portage/build.php index 781aaef..2d2f32f 100644 --- a/backend/modules/gentoo_portage/build.php +++ b/backend/modules/gentoo_portage/build.php @@ -2,9 +2,9 @@ require_once(dirname(__FILE__).'/packages.php'); // __DIR__ 5.3.0 $profile=new sql_gentoo_profile($opts['profile']); $headers=$profile->get_headers(); -$I="$workdir/image"; -$C="$workdir/config_root"; -$S['prtg_cfgrt']=array('PORTAGE_CONFIGROOT' => $C); +$imagedir="$workdir/image"; +$confdir="$workdir/config_root"; +$S['prtg_cfgrt']=array('PORTAGE_CONFIGROOT' => $confdir); add_step('setup'); add_step('base-system'); $extra=explode(' ', $opts['options']); @@ -22,5 +22,5 @@ if (strlen($opts['pkgsets'])) add_step('pkgsets'); if (strlen($opts['install_packages'])) add_step('misc-pkgs'); -return $I; +return $imagedir; ?> diff --git a/backend/modules/gentoo_portage/hostname.php b/backend/modules/gentoo_portage/hostname.php index 11c7d20..e710560 100644 --- a/backend/modules/gentoo_portage/hostname.php +++ b/backend/modules/gentoo_portage/hostname.php @@ -1,4 +1,4 @@ diff --git a/backend/modules/gentoo_portage/init.d.php b/backend/modules/gentoo_portage/init.d.php index deef101..9ab61e6 100644 --- a/backend/modules/gentoo_portage/init.d.php +++ b/backend/modules/gentoo_portage/init.d.php @@ -2,7 +2,7 @@ start_internal_task('Remove unwanted init scripts'); foreach (explode(' ', $opts['pruneinit']) as $init) { list($name, $runlevel)=explode(':', $init, 2); - log_status("$name ($runlevel)", unlink("$I/etc/runlevels/$runlevel/$name")); + log_status("$name ($runlevel)", unlink("$imagedir/etc/runlevels/$runlevel/$name")); } end_internal_task(0); ?> diff --git a/backend/modules/gentoo_portage/portage.php b/backend/modules/gentoo_portage/portage.php index a1eb3ed..bcfa7d7 100644 --- a/backend/modules/gentoo_portage/portage.php +++ b/backend/modules/gentoo_portage/portage.php @@ -3,14 +3,14 @@ $file=glob(CACHE.'/portage/*.tar.bz2'); if ($file) { $file=array_reverse($file); $file=$file[0]; - execute_command('Unpack portage snapshot', "tar -xvjpf '$file' -C '$I/usr'"); + execute_command('Unpack portage snapshot', "tar -xvjpf '$file' -C '$imagedir/usr'"); } else { start_internal_task('Copy local portage tree to 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'"; + $cmd="cp -av -t '$imagedir/usr/portage/' '$from'"; error_get_last(); @shell_exec($cmd); end_internal_task((int)(bool)error_get_last()); @@ -33,8 +33,8 @@ foreach ($makeconf as $name => $val) $contents.=strtoupper($name).'="'.str_replace('"', '\"', $val)."\"\n"; unset($makeconf); log_msg("/etc/make.conf:\n$contents"); -log_status('Writing /etc/make.conf', file_put_contents("$I/etc/make.conf", $contents)); -log_status('Remove previous make.profile', unlink("$I/etc/make.profile"), false); -log_status("Symlink make.profile -> /usr/portage/profiles/{$headers['profile']}", symlink("/usr/portage/profiles/{$headers['profile']}", "$I/etc/make.profile")); +log_status('Writing /etc/make.conf', file_put_contents("$imagedir/etc/make.conf", $contents)); +log_status('Remove previous make.profile', unlink("$imagedir/etc/make.profile"), false); +log_status("Symlink make.profile -> /usr/portage/profiles/{$headers['profile']}", symlink("/usr/portage/profiles/{$headers['profile']}", "$imagedir/etc/make.profile")); end_internal_task(0); ?> diff --git a/backend/modules/gentoo_portage/setup.php b/backend/modules/gentoo_portage/setup.php index d96eb51..93dbad8 100644 --- a/backend/modules/gentoo_portage/setup.php +++ b/backend/modules/gentoo_portage/setup.php @@ -1,12 +1,12 @@ .", symlink('.', "$C/etc")); +makedirs($imagedir, $confdir, "$workdir/log", "$workdir/tmp"); +log_status("Make symlink $confdir/etc -> .", symlink('.', "$confdir/etc")); $makeconf=array( 'pkgdir' => $S['conf']['pkgdir_root'].'/'.$profile->pkgdir, 'chost' => $headers['chost'], 'accept_keywords' => $headers['accept_keywords'], - 'root' => $I, + 'root' => $imagedir, 'port_logdir' => "$workdir/log", 'emerge_log_dir' => "$workdir/log", 'portage_tmpdir' => "$workdir/tmp" @@ -15,8 +15,8 @@ $contents=''; foreach ($makeconf as $name => $val) $contents.=strtoupper($name).'="'.str_replace('"', '\"', $val)."\"\n"; unset($makeconf); -log_status("Write $C/etc/make.conf", file_put_contents("$C/etc/make.conf", $contents)); +log_status("Write $confdir/etc/make.conf", file_put_contents("$confdir/etc/make.conf", $contents)); unset($contents); -log_status('Make make.profile symlink to '.$S['conf']['portdir'].'/profiles/'.$headers['profile'], symlink($S['conf']['portdir'].'/profiles/'.$headers['profile'], $C.'/etc/make.profile')); +log_status('Make make.profile symlink to '.$S['conf']['portdir'].'/profiles/'.$headers['profile'], symlink($S['conf']['portdir'].'/profiles/'.$headers['profile'], $confdir.'/etc/make.profile')); end_internal_task(0); ?> diff --git a/backend/modules/gentoo_portage/timezone.php b/backend/modules/gentoo_portage/timezone.php index e5cc196..b5d4e6e 100644 --- a/backend/modules/gentoo_portage/timezone.php +++ b/backend/modules/gentoo_portage/timezone.php @@ -1,9 +1,9 @@ -- cgit v1.2.3-65-gdbad