From 2b3661e346d2ffcecba23c190080dc15a24780cb Mon Sep 17 00:00:00 2001 From: Joshua Ismael Haase Hernandez Date: Wed, 1 Jun 2011 02:16:57 -0500 Subject: fullpkg-ng: * remove_queue used on build cycle * usage function updated * dep_not_found:$_dep:$repo --- fullpkg-ng | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'fullpkg-ng') diff --git a/fullpkg-ng b/fullpkg-ng index 5311593..3f44258 100755 --- a/fullpkg-ng +++ b/fullpkg-ng @@ -26,7 +26,7 @@ function usage { echo " -d build_dir : use this dir to build. Defaults to mktemp." echo " -n : don't update pacman db." echo " -m max_level : check deps until this level" - echo " -r \"command\" : use this instead of $FULLBUILDCMD" + echo " -r \"command\" : use this instead of \"$FULLBUILDCMD\"" # printf " -f pkgname : build even when a package has been built. " # printf " Use it as many times as needed\n" echo @@ -79,7 +79,7 @@ check_queue() { local packager=$(grep -w "$(basename $PWD)" ${queue_file} | cut -d ':' -f2) - [ ! -z $packager -a "$packager" != "$PACKAGER" ] && { + [ -n $packager -a "$packager" != "$PACKAGER" ] && { warning "$(basename $PWD) is being packaged by $packager. Please wait." return 1 } @@ -146,27 +146,28 @@ function find_deps { for _dep in ${deps[@]}; do for _repo in ${REPOS[@]}; do # try to find $_dep on each repo from dirname - [ -e "$ABSROOT/${_repo}/$_dep/PKGBUILD" ] && { + if [ -e "$ABSROOT/${_repo}/$_dep/PKGBUILD" ]; then pushd "$ABSROOT/${_repo}/$_dep" > /dev/null $0 -c -d ${build_dir} -l ${next_level} # Circular deps must fail [ $? -eq 20 ] && return 20 popd > /dev/null - } && break 1 # found, go to next dep - + break 1 # found, go to next dep # if search pkgname in repo doesn't work # this should find pkgsplits - _dir=$(find "$ABSROOT/${_repo}" -type f -name PKGBUILD -print0 | \ - "xargs" -0 -e grep -HEw "pkgname|pkgbase" | grep $_dep 2>&1) - [ -n "$_dir" ] && { + elif _dir=$(find "$ABSROOT/${_repo}" -type f -name PKGBUILD -print0 | \ + "xargs" -0 -e grep -HEw "pkgname|pkgbase" | grep $_dep 2>&1) \ + [ -n "$_dir" ]; then pushd $(dirname $(echo $_dir | cut -d: -f1)) > /dev/null $0 -c -d ${build_dir} -l ${next_level} # Circular deps must fail [ $? -eq 20 ] && return 20 popd > /dev/null - } && break 1 # found, go to next dep + break 1 # found, go to next dep + else + echo "dep_not_found:$_dep:$_repo" >> $build_dir/log + fi done - echo "dep_not_found:$_dep" >> $build_dir/log done unset next_level dir # unset PKGBUILD variables @@ -240,6 +241,8 @@ function _pkg_build () { # Package was built or failed: take it out of $buildorder grep -vwh "${build_packages[0]}" $buildorder > $buildorder.2 mv $buildorder.2 $buildorder + # Take package out from queue + remove_queue popd > /dev/null done pkgs=$(cat $build_dir/log | grep "nonfree:") && { -- cgit v1.2.3-2-g168b