From: "Liam McLoughlin" <hexxeh@hexxeh.net>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoaster:master commit in: /
Date: Sun, 10 Jul 2011 23:53:46 +0000 (UTC) [thread overview]
Message-ID: <1bae2a947fb5db183361f3cda1440d0192abec3a.hexxeh@gentoo> (raw)
commit: 1bae2a947fb5db183361f3cda1440d0192abec3a
Author: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
AuthorDate: Sun Jul 10 23:53:34 2011 +0000
Commit: Liam McLoughlin <hexxeh <AT> hexxeh <DOT> net>
CommitDate: Sun Jul 10 23:53:34 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoaster.git;a=commit;h=1bae2a94
Added compress flag to build tool
---
create_image.sh | 13 +++++++++++--
daemon.php | 2 +-
status.php | 2 +-
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/create_image.sh b/create_image.sh
index 0cc7f4f..94004a8 100755
--- a/create_image.sh
+++ b/create_image.sh
@@ -29,6 +29,7 @@ RUNNING_DIRECTORY=$(cd `dirname $0` && pwd)
DEFINE_string 'config' '' 'configuration to build from'
DEFINE_string 'proxy' '' 'HTTP proxy to use for emerges'
DEFINE_boolean 'cachedkernel' false 'use a cached kernel (shortens build time)'
+DEFINE_boolean 'compress' false 'compressed the finished image'
FLAGS "$@" || exit 1
eval set -- "${FLAGS_ARGV}"
@@ -263,21 +264,29 @@ case "${OUTPUT_FORMAT}" in
;;
"vbox" )
echo "Converting image from RAW to VDI" &>> ${LOG_FILE}
- qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi || handle_error "Error converting disk image to VDI format"
+ qemu-img convert -O vdi ${IMAGE_NAME} ${BUILD_ID}.vdi &>> ${LOG_FILE} || handle_error "Error converting disk image to VDI format"
rm -rf ${IMAGE_NAME}
IMAGE_OUT="${BUILD_ID}.vdi"
;;
"vmware" )
echo "Converting image from RAW to VMDK" &>> ${LOG_FILE}
- qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk || handle_error "Error converting disk image to VMDK format"
+ qemu-img convert -O vmdk ${IMAGE_NAME} ${BUILD_ID}.vmdk &>> ${LOG_FILE} || handle_error "Error converting disk image to VMDK format"
rm -rf ${IMAGE_NAME}
IMAGE_OUT="${BUILD_ID}.vmdk"
;;
esac
+
mv ${IMAGE_OUT} ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT} || handle_error "Error moving finished image"
mv ${LOG_FILE} ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log || handle_error "Error moving log file"
+LOG_FILE="${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"
rm -rf ${IMAGE_WORK_PATH} || handle_error "Error removing working directory"
+if [[ ${FLAGS_compress} -eq ${FLAGS_TRUE} ]]; then
+ cd ${IMAGES_OUTPUT_PATH}
+ tar czvf "${BUILD_ID}.tar.gz" "${IMAGE_OUT}" &>> ${LOG_FILE} || handle_error "Error compressing image"
+ IMAGE_OUT="${BUILD_ID}.tar.gz"
+fi
+
echo "Step 23: Image build completed!"
echo "Your image is here: ${IMAGES_OUTPUT_PATH}/${IMAGE_OUT}"
echo "Your log file is here: ${IMAGES_OUTPUT_PATH}/${BUILD_ID}.log"
diff --git a/daemon.php b/daemon.php
index 3665abc..af7143b 100644
--- a/daemon.php
+++ b/daemon.php
@@ -45,7 +45,7 @@
if(is_writable($build_path)) {
chdir($build_path);
file_put_contents("config.ini", $configuration_string);
- $tool_args = "--config config.ini";
+ $tool_args = "--config config.ini --compress";
$process_handle = popen($gentoaster_path."/".$tool_name." ".$tool_args." 2>&1", "r");
$nonstatus_output = "";
diff --git a/status.php b/status.php
index f5b5da0..e5624dd 100644
--- a/status.php
+++ b/status.php
@@ -20,7 +20,7 @@
} else {
$result = mysql_query("SELECT returncode, result FROM builds WHERE id = '".mysql_real_escape_string($argv[1])."'");
$jobres = mysql_fetch_array($result);
- if($jobres[0] != NULL) {
+ if($jobres[0] !== NULL) {
echo "Job returned with code ".$jobres[0].": ".$jobres[1]."\n";
} else {
echo "Job failed\n";
next reply other threads:[~2011-07-10 23:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-10 23:53 Liam McLoughlin [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-08-23 21:29 [gentoo-commits] proj/gentoaster:master commit in: / Liam McLoughlin
2011-08-19 13:09 Liam McLoughlin
2011-08-15 2:24 Liam McLoughlin
2011-08-15 2:00 Liam McLoughlin
2011-08-15 1:54 Liam McLoughlin
2011-08-14 15:46 Liam McLoughlin
2011-08-12 23:18 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-12 23:17 Liam McLoughlin
2011-08-11 20:31 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:18 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-15 20:41 [gentoo-commits] proj/gentoaster:webui " Liam McLoughlin
2011-08-12 23:17 ` [gentoo-commits] proj/gentoaster:master " Liam McLoughlin
2011-07-11 14:00 Liam McLoughlin
2011-07-08 22:41 Liam McLoughlin
2011-07-08 18:47 Liam McLoughlin
2011-07-08 18:35 Liam McLoughlin
2011-07-08 18:27 Liam McLoughlin
2011-07-08 17:27 Liam McLoughlin
2011-07-08 2:45 Liam McLoughlin
2011-06-16 1:01 Liam McLoughlin
2011-06-16 1:01 Liam McLoughlin
2011-06-14 21:28 Liam McLoughlin
2011-06-14 21:03 Liam McLoughlin
2011-06-14 20:44 Liam McLoughlin
2011-06-08 0:06 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-05 23:32 Liam McLoughlin
2011-06-04 3:47 Liam McLoughlin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1bae2a947fb5db183361f3cda1440d0192abec3a.hexxeh@gentoo \
--to=hexxeh@hexxeh.net \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox