summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-05-30 12:42:02 -0500
committerJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-05-30 12:42:02 -0500
commitfe983eea4b3cedbdd3ca33b05162340b2a4a4e7a (patch)
tree478eab2bf10792a17a123301beb76e4d7147bd4b
parent876db1b485e846f23c796b01f69ba2d61abafbdb (diff)
* shortened check_queue test
* tried to correct find_deps pkgsplit search * build_packages set at begining of cycle in _pkg_build and removed from $buildorder when failed.
-rwxr-xr-xfullpkg-ng9
1 files changed, 5 insertions, 4 deletions
diff --git a/fullpkg-ng b/fullpkg-ng
index e171ef7..485ba90 100755
--- a/fullpkg-ng
+++ b/fullpkg-ng
@@ -79,7 +79,7 @@ check_queue() {
local packager=$(grep -w "$(basename $PWD)" ${queue_file} | cut -d ':' -f2)
- [ ! -z $packager ] && [ "$packager" != "$PACKAGER" ] && {
+ [ ! -z $packager -a "$packager" != "$PACKAGER" ] && {
warning "$(basename $PWD) is being packaged by $packager. Please wait."
return 1
}
@@ -158,7 +158,8 @@ function find_deps {
# 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 -H -Ew $_dep >/dev/null 2>&1) && {
+ "xargs" -0 -e grep -HEw "pkgname|pkgbase" | grep $_dep 2>&1)
+ [ -n "$_dir" ] && {
pushd $(dirname $(echo $_dir | cut -d: -f1)) > /dev/null
$0 -c -d ${build_dir} -l ${next_level}
# Circular deps must fail
@@ -181,7 +182,6 @@ function _pkg_build () {
while [ ${#build_packages[@]} -ge 1 ]; do
build_packages=$(sort -gr $buildorder | cut -d: -f2)
pushd $build_dir/${build_packages[0]} > /dev/null
- unset build_packages
source PKGBUILD
msg2 "${pkgbase:-${pkgname[0]}} $pkgver-$pkgrel"
if ! grep mips64el PKGBUILD >/dev/null; then
@@ -193,6 +193,7 @@ function _pkg_build () {
check_queue || {
echo "someone_is_building:$(basename $PWD)" >> $build_dir/log
grep -vwh "$(basename $PWD)" $buildorder > $buildorder.2
+ mv $buildorder.2 $buildorder
continue
}
msg2 "Updating build queue"
@@ -204,6 +205,7 @@ function _pkg_build () {
if [ $? -eq 15 ]; then
echo "nonfree:$(basename $PWD)" >> $build_dir/log
grep -vwh "$(basename $PWD)" $buildorder > $buildorder.2
+ mv $buildorder $buildorder.2
continue
fi
}
@@ -226,7 +228,6 @@ function _pkg_build () {
esac
grep -vwh "${build_packages[0]}" $buildorder > $buildorder.2
mv $buildorder.2 $buildorder
- build_packages=$(sort -gr $buildorder | cut -d: -f2)
popd > /dev/null
done
pkgs=$(cat $build_dir/log | grep "nonfree:") && {