diff options
Diffstat (limited to 'fullpkg')
-rwxr-xr-x | fullpkg | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -31,7 +31,7 @@ source /etc/libretools.conf # Get the queue list from the server get_queue() { rsync -e ssh -aq $PARABOLAHOST:mips64el/queue $queue_file >/dev/null 2>&1 || { - echo ":: Failed to retrieve queue list" + error "Failed to retrieve queue list" return 1 } } @@ -39,7 +39,7 @@ get_queue() { # Put the queue list on the server put_queue() { rsync -e ssh -aq $queue_file $PARABOLAHOST:mips64el/queue >/dev/null 2>&1 || { - echo ":: Failed to put queue list" + error "Failed to put queue list" return 1 } } @@ -70,7 +70,7 @@ check_queue() { packager=$(grep -w "$(basename $PWD)" ${queue_file} | cut -d ':' -f2) [[ ! -z $packager ]] && [[ "$packager" != "$PACKAGER" ]] && { - echo ":: $(basename $PWD) is being packaged by $packager. Please wait." + warning "$(basename $PWD) is being packaged by $packager. Please wait." return 1 } @@ -86,7 +86,7 @@ quit() { } source PKGBUILD -echo ":: Building ${pkgbase} ${pkgname[@]}" +msg ":: Building ${pkgbase} ${pkgname[@]}" trap "quit" SIGTERM SIGKILL @@ -110,8 +110,10 @@ deps=$(echo "${depends[@]} ${makedepends[@]} ${pkgdeps[@]}" | \ tr ' ' "\n" | \ sort -u) -echo $_deps +msg "Checking dependencies" +plain "$_deps" +msg "Syncing database" sudo pacman -Sy for _dep in ${deps[@]}; do @@ -121,7 +123,7 @@ for _dep in ${deps[@]}; do # TODO find split packages [[ -e "$ABSROOT/${_repo}/$_dep/PKGBUILD" ]] && { cp -r "$ABSROOT/$_repo/$_dep" $tmp_dir/ || { - echo "Can't copy $_dep to the work dir." + error "Can't copy $_dep to the work dir." exit 1 } @@ -150,7 +152,7 @@ done # TODO probably not elegant enough #[[ ${#failed[@]} -gt 0 ]] || [[ ${#missing[@]} -gt 0 ]] && { [[ ${#failed[@]} -gt 0 ]] && { - echo ":: This packages failed to build: ${failed[@]}" + error "This packages failed to build: ${failed[@]}" exit 1 } @@ -163,24 +165,24 @@ done # Let everybody know we're building this update_queue || { - echo ":: Couldn't update the queue, let your partners know about this." + warning "Couldn't update the queue, let your partners know about this." } cp -r ../$(basename $PWD) $tmp_dir/ pushd $tmp_dir/$(basename $PWD) >/dev/null -sudo pacman -Sy + makepkg --noconfirm -sLcr ; r=$? case $r in 0) - echo "==> The build was succesful." + msg "The build was succesful." mipsrelease *.pkg.tar.* ;; 1) - echo "==> The build failed." + error "The build failed." ;; 2) - echo "==> The build failed." + error "The build failed." ;; esac |