From 4fe9c146df933ab7ff40fe30bb69e8c134ac1b34 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Thu, 25 Aug 2011 18:02:51 +0200 Subject: [PATCH] [particles] add default buildfail script --- hooks/buildfail.sh | 37 +++++++++++++++++++++++++++++++ monthly/xonotic-9999.particle | 2 +- particle.skel | 2 +- weekly/app-accessibility.particle | 2 +- weekly/app-admin.particle | 2 +- weekly/app-antivirus.particle | 2 +- weekly/app-arch.particle | 2 +- weekly/app-backup.particle | 2 +- weekly/app-benchmarks.particle | 2 +- weekly/app-cdr.particle | 2 +- weekly/app-crypt.particle | 2 +- weekly/app-dicts.particle | 2 +- weekly/app-doc.particle | 2 +- weekly/app-editors.particle | 2 +- weekly/app-emacs.particle | 2 +- weekly/app-emulation.particle | 2 +- weekly/app-forensics.particle | 2 +- weekly/app-i18n.particle | 2 +- weekly/app-laptop.particle | 2 +- weekly/app-mobilephone.particle | 2 +- weekly/app-office.particle | 2 +- weekly/app-shells.particle | 2 +- weekly/dev-perl.particle | 2 +- weekly/dev-php.particle | 2 +- weekly/games.particle | 2 +- weekly/media-sound.particle | 2 +- weekly/net-analyzer.particle | 2 +- 27 files changed, 63 insertions(+), 26 deletions(-) create mode 100755 hooks/buildfail.sh diff --git a/hooks/buildfail.sh b/hooks/buildfail.sh new file mode 100755 index 0000000..bc466f6 --- /dev/null +++ b/hooks/buildfail.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# MATTTER_PORTAGE_REPOSITORY = portage repository +# MATTER_PORTAGE_FAILED_PACKAGE_NAME = CPV of failed package + +DATE_DIR=$(date +%Y-%m-%d-%H:%M) + +BUILD_LOG=$(echo -n "${MATTER_PORTAGE_BUILD_LOG_DIR}/${MATTER_PORTAGE_FAILED_PACKAGE_NAME}"*.log) +if [ -z "${BUILD_LOG}" ]; then + echo "cannot find build log, wtf??" + exit 1 +fi +if [ ! -f "${BUILD_LOG}" ]; then + echo "cannot find build log file" + exit 1 +fi +REMOTE_DIR="~/tinderbox/${DATE_DIR}/${MATTER_PORTAGE_FAILED_PACKAGE_NAME}" + +echo "Uploading ${BUILD_LOG} to tinderbox.sabayon.org..." +ssh entropy@tinderbox.sabayon.org mkdir -p "${REMOTE_DIR}" + +tmp_path=$(mktemp --suffix=.emerge.info.txt) +emerge --info =${MATTER_PORTAGE_FAILED_PACKAGE_NAME} > "${tmp_path}" +if [ "${?}" != "0" ]; then + rm "${tmp_path}" + exit ${?} +fi +chmod 640 "${tmp_path}" +scp "${tmp_path}" entropy@tinderbox.sabayon.org:"${REMOTE_DIR}"/ +if [ "${?}" != "0" ]; then + rm "${tmp_path}" + exit 1 +fi +rm "${tmp_path}" +scp "${BUILD_LOG}" entropy@tinderbox.sabayon.org:"${REMOTE_DIR}"/ || exit 1 + +exit 0 + diff --git a/monthly/xonotic-9999.particle b/monthly/xonotic-9999.particle index 735d1ba..854f60e 100644 --- a/monthly/xonotic-9999.particle +++ b/monthly/xonotic-9999.particle @@ -76,7 +76,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/particle.skel b/particle.skel index d260792..b3e4eaa 100644 --- a/particle.skel +++ b/particle.skel @@ -71,7 +71,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-accessibility.particle b/weekly/app-accessibility.particle index 1bbab08..f327d8e 100644 --- a/weekly/app-accessibility.particle +++ b/weekly/app-accessibility.particle @@ -111,7 +111,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-admin.particle b/weekly/app-admin.particle index 57f0dbe..40e2b45 100644 --- a/weekly/app-admin.particle +++ b/weekly/app-admin.particle @@ -209,7 +209,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-antivirus.particle b/weekly/app-antivirus.particle index a24feb3..cd3a878 100644 --- a/weekly/app-antivirus.particle +++ b/weekly/app-antivirus.particle @@ -73,7 +73,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-arch.particle b/weekly/app-arch.particle index eaba8ad..9fe77d5 100644 --- a/weekly/app-arch.particle +++ b/weekly/app-arch.particle @@ -152,7 +152,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-backup.particle b/weekly/app-backup.particle index a241b81..ea517fd 100644 --- a/weekly/app-backup.particle +++ b/weekly/app-backup.particle @@ -104,7 +104,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-benchmarks.particle b/weekly/app-benchmarks.particle index c84026f..bf6efd7 100644 --- a/weekly/app-benchmarks.particle +++ b/weekly/app-benchmarks.particle @@ -99,7 +99,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-cdr.particle b/weekly/app-cdr.particle index 47bae54..9ada850 100644 --- a/weekly/app-cdr.particle +++ b/weekly/app-cdr.particle @@ -134,7 +134,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-crypt.particle b/weekly/app-crypt.particle index d77786e..64f2a70 100644 --- a/weekly/app-crypt.particle +++ b/weekly/app-crypt.particle @@ -146,7 +146,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-dicts.particle b/weekly/app-dicts.particle index 888240d..30abf66 100644 --- a/weekly/app-dicts.particle +++ b/weekly/app-dicts.particle @@ -419,7 +419,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-doc.particle b/weekly/app-doc.particle index 4aeab44..d6acc5b 100644 --- a/weekly/app-doc.particle +++ b/weekly/app-doc.particle @@ -108,7 +108,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-editors.particle b/weekly/app-editors.particle index edcf17f..9a41474 100644 --- a/weekly/app-editors.particle +++ b/weekly/app-editors.particle @@ -144,7 +144,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-emacs.particle b/weekly/app-emacs.particle index 635ed6c..47c52d1 100644 --- a/weekly/app-emacs.particle +++ b/weekly/app-emacs.particle @@ -248,7 +248,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-emulation.particle b/weekly/app-emulation.particle index 4df869c..c1ad614 100644 --- a/weekly/app-emulation.particle +++ b/weekly/app-emulation.particle @@ -140,7 +140,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-forensics.particle b/weekly/app-forensics.particle index 59014c6..3b0e7c8 100644 --- a/weekly/app-forensics.particle +++ b/weekly/app-forensics.particle @@ -94,7 +94,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-i18n.particle b/weekly/app-i18n.particle index 1c3bce7..f2aae67 100644 --- a/weekly/app-i18n.particle +++ b/weekly/app-i18n.particle @@ -162,7 +162,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-laptop.particle b/weekly/app-laptop.particle index 4bc3728..74a7be1 100644 --- a/weekly/app-laptop.particle +++ b/weekly/app-laptop.particle @@ -87,7 +87,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-mobilephone.particle b/weekly/app-mobilephone.particle index 522e3a3..51d0b03 100644 --- a/weekly/app-mobilephone.particle +++ b/weekly/app-mobilephone.particle @@ -97,7 +97,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-office.particle b/weekly/app-office.particle index 14f2eef..af8a62f 100644 --- a/weekly/app-office.particle +++ b/weekly/app-office.particle @@ -118,7 +118,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/app-shells.particle b/weekly/app-shells.particle index c550846..1b8df5b 100644 --- a/weekly/app-shells.particle +++ b/weekly/app-shells.particle @@ -94,7 +94,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/dev-perl.particle b/weekly/dev-perl.particle index e8f32ef..602b06d 100644 --- a/weekly/dev-perl.particle +++ b/weekly/dev-perl.particle @@ -1099,7 +1099,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/dev-php.particle b/weekly/dev-php.particle index 2c7ba1c..8602be8 100644 --- a/weekly/dev-php.particle +++ b/weekly/dev-php.particle @@ -251,7 +251,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/games.particle b/weekly/games.particle index 19070f0..e497072 100644 --- a/weekly/games.particle +++ b/weekly/games.particle @@ -660,7 +660,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/media-sound.particle b/weekly/media-sound.particle index 5b5e2df..f495054 100644 --- a/weekly/media-sound.particle +++ b/weekly/media-sound.particle @@ -395,7 +395,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help diff --git a/weekly/net-analyzer.particle b/weekly/net-analyzer.particle index 850ac98..7118067 100644 --- a/weekly/net-analyzer.particle +++ b/weekly/net-analyzer.particle @@ -300,7 +300,7 @@ removed-useflags: yes # comes from # MATTER_PORTAGE_BUILD_LOG_DIR = directory containing all the build logs of # the failed package -# buildfail: /home/fabio/repos/entropy/services/matter_examples/buildfail.sh +buildfail: /particles/hooks/buildfail.sh # For more info regarding exported environment variables, please see: # matter --help