summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-10-07 12:41:00 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-27 15:46:05 +0200
commit81023f6318b0257fd266585b34817dee46c37e35 (patch)
treec39c065208bd56812b0c0e4a2db35e5d98e56c83
parent517e420a8a7a2222c3fba25a049cbed694d74ae9 (diff)
downloaddbscripts-81023f6318b0257fd266585b34817dee46c37e35.tar.gz
dbscripts-81023f6318b0257fd266585b34817dee46c37e35.tar.xz
be more quiet unless errors occur
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--db-functions13
-rw-r--r--test/lib/common.inc4
-rwxr-xr-xtest/test.d/db-update.sh4
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