From facfdb9ee6d55c950efffcfb380888de851c3450 Mon Sep 17 00:00:00 2001 From: Diego Elio Pettenò Date: Fri, 15 Oct 2010 20:23:00 +0200 Subject: Don't try to send dents if no BTI_ACCOUNT is set. Since my tinderbox has been banned from identi.ca, I have no reason to keep sending dents, it just wastes my time. --- bashrc | 10 +++++++--- emerge-wrapper.sh | 14 ++++++++++++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/bashrc b/bashrc index 7059d2b..043c7ee 100755 --- a/bashrc +++ b/bashrc @@ -16,9 +16,13 @@ # ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. -dent_me() { - echo "$@" | bti ${TINDERBOX_PROXY:+--proxy "${TINDERBOX_PROXY}"} --host "${BTI_HOST}" --account "${BTI_ACCOUNT}" --password "${BTI_PASSWORD}" --background -} +if [[ -n ${BTI_ACCOUNT} ]]; then + dent_me() { + echo "$@" | bti ${TINDERBOX_PROXY:+--proxy "${TINDERBOX_PROXY}"} --host "${BTI_HOST}" --account "${BTI_ACCOUNT}" --password "${BTI_PASSWORD}" --background + } +else + dent_me() { :; } +fi pre_pkg_setup() { dent_me "${CATEGORY}/${PF} merge starting" diff --git a/emerge-wrapper.sh b/emerge-wrapper.sh index f0cd926..d6ae546 100755 --- a/emerge-wrapper.sh +++ b/emerge-wrapper.sh @@ -19,9 +19,19 @@ if [[ -f /var/log/emerge.log ]]; then rm -f /var/log/emerge.log fi +source /etc/make.tinderbox.private.conf + +if [[ -n ${BTI_ACCOUNT} ]]; then + dent_me() { + echo "$@" | bti ${TINDERBOX_PROXY:+--proxy "${TINDERBOX_PROXY}"} --host "${BTI_HOST}" --account "${BTI_ACCOUNT}" --password "${BTI_PASSWORD}" --background + } +else + dent_me() { :; } +fi + # Don't tweet this away if we're running a non-test try if [[ -z "${FEATURES}" ]]; then - echo "$1 queued" | bti --background; + dent_me "$1 queued" fi emerge --nospinner --oneshot --deep --update --keep-going --selective=n "$1" < /dev/null @@ -43,7 +53,7 @@ if [[ $res != 0 ]]; then # This only hits the second time, so we're safely assuming # that the package will reject to be merged as it is, why, # we'll have to check. - echo "$1 merge #rejected" | bti --background + dent_me "$1 merge #rejected" fi fi fi -- cgit v1.2.3-65-gdbad