From 81023f6318b0257fd266585b34817dee46c37e35 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 7 Oct 2014 12:41:00 +0200 Subject: be more quiet unless errors occur Signed-off-by: Florian Pritz --- db-functions | 13 +++++++++---- test/lib/common.inc | 4 ++-- test/test.d/db-update.sh | 4 ++-- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/db-functions b/db-functions index 1ef2901..ca3e8e8 100644 --- a/db-functions +++ b/db-functions @@ -581,15 +581,20 @@ arch_history_remove() { } arch_history_commit() { - pushd "$HISTORYREPO" + pushd "$HISTORYREPO" >/dev/null + did_work=0 if ((${#HISTORY_add_files[@]} > 0)); then git add -- "${HISTORY_add_files[@]}" + did_work=1 fi if ((${#HISTORY_remove_files[@]} > 0)); then - git rm -- "${HISTORY_remove_files[@]}" + git rm -q -- "${HISTORY_remove_files[@]}" + did_work=1 fi - git commit -q -m "$1" - popd + if ((did_work)); then + git commit -q -m "$1" + fi + popd >/dev/null } pkgentry_from_db() { diff --git a/test/lib/common.inc b/test/lib/common.inc index cf22be5..554fb9a 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -17,7 +17,7 @@ signpkg() { if [[ -n $GPGKEY ]]; then SIGNWITHKEY="-u ${GPGKEY}" fi - gpg --detach-sign --use-agent ${SIGNWITHKEY} ${@} || die + gpg --batch -q --detach-sign --use-agent ${SIGNWITHKEY} ${@} || die } oneTimeSetUp() { @@ -89,7 +89,7 @@ setUp() { mkdir -p "${TMP}/ftp/${PKGPOOL}" mkdir -p "${TMP}/ftp/${SRCPOOL}" mkdir -p "${TMP}/history-repo" - git init "${TMP}/history-repo" + git init -q "${TMP}/history-repo" msg 'Creating svn repository...' svnadmin create "${TMP}/svn-packages-repo" diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh index 7a5ce4c..fa07077 100755 --- a/test/test.d/db-update.sh +++ b/test/test.d/db-update.sh @@ -82,7 +82,7 @@ testUpdateAnyPackage() { pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null sed 's/pkgrel=1/pkgrel=2/g' -i PKGBUILD arch_svn commit -q -m"update pkg to pkgrel=2" >/dev/null - sudo extra-i686-build + sudo chronic extra-i686-build mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" popd >/dev/null @@ -100,7 +100,7 @@ testUpdateAnyPackageToDifferentRepositoriesAtOnce() { pushd "${TMP}/svn-packages-copy/pkg-any-a/trunk/" >/dev/null sed 's/pkgrel=1/pkgrel=2/g' -i PKGBUILD arch_svn commit -q -m"update pkg to pkgrel=2" >/dev/null - sudo extra-i686-build + sudo chronic extra-i686-build mv pkg-any-a-1-2-any.pkg.tar.xz "${pkgdir}/pkg-any-a/" popd >/dev/null -- cgit v1.2.3-24-g4f1b