summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-06-01 02:16:57 -0500
committerJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-06-01 02:16:57 -0500
commit2b3661e346d2ffcecba23c190080dc15a24780cb (patch)
tree2514512bc612616f26ccb977ce4d26745d00a568
parentc2f7efb3e802f79928ef5a6bc529a153bd69c38c (diff)
fullpkg-ng:
* remove_queue used on build cycle * usage function updated * dep_not_found:$_dep:$repo
-rwxr-xr-xfullpkg-ng23
1 files changed, 13 insertions, 10 deletions
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:") && {