From cb8568166afa7089648407fffd4b494a0b937abb Mon Sep 17 00:00:00 2001 From: Nicolas Reynolds Date: Sun, 17 Apr 2011 03:53:59 -0300 Subject: Better messages, first stab at using librerelease, update system before building --- fullpkg | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'fullpkg') diff --git a/fullpkg b/fullpkg index c3c44a8..3b2985b 100755 --- a/fullpkg +++ b/fullpkg @@ -1,8 +1,8 @@ #!/bin/bash # TODO +# * Do version checking # * Detect circular builds # * Detect pkgnames by provides, replaces, etc. instead of dir tree -# * Detect package repo [[ ! -r PKGBUILD ]] && { echo "This isn't a build directory" @@ -100,16 +100,16 @@ quit() { } source PKGBUILD -msg ":: Building ${pkgbase:-${pkgname[@]}}" +msg "Building ${pkgbase:-${pkgname[@]}}: $pkgdesc" is_built "${pkgbase:-${pkgname[0]}}>=${pkgver}" && exit 0 #sudo pacman -Sy -trap "quit" SIGTERM SIGKILL +trap "quit" TERM KILL INT if is_banned ${pkgbase:-$pkgname}; then - echo "This package is banned from building. Check the ban list" + error "This package is banned from building. Check the ban list" exit 1 fi @@ -146,12 +146,12 @@ for _dep in ${deps[@]}; do # TODO find split packages [[ -e "$ABSROOT/${_repo}/$_dep/PKGBUILD" ]] && { source "$ABSROOT/${_repo}/$_dep/PKGBUILD" - msg "Checking for $_dep>=$pkgver" + msg2 "Checking for $_dep>=$pkgver" # If this version is built, continue with the next dep if is_built "$_dep>=$pkgver"; then - msg "No need to build this one" + msg2 "No need to build this one" break fi @@ -183,7 +183,7 @@ for _dep in ${deps[@]}; do done # TODO probably not elegant enough -#[[ ${#failed[@]} -gt 0 ]] || [[ ${#missing[@]} -gt 0 ]] && { +# [[ ${#failed[@]} -gt 0 ]] || [[ ${#missing[@]} -gt 0 ]] && { [[ ${#failed[@]} -gt 0 ]] && { error "This packages failed to build: ${failed[@]}" exit 1 @@ -205,12 +205,15 @@ cp -r ../$(basename $PWD) $tmp_dir/ pushd $tmp_dir/$(basename $PWD) >/dev/null msg "Syncing database" -sudo pacman -Sy -makepkg --noconfirm -sLcr $@ ; r=$? +sudo pacman -Syu --noconfirm +makepkg --noconfirm -sLcr ; r=$? case $r in 0) msg "The build was succesful." mipsrelease *.pkg.tar.* + + ~/l/librestage ${1:-$(basename $(dirname $PWD))} + sudo pacman -Sy ;; 1) -- cgit v1.2.2