summaryrefslogtreecommitdiff
path: root/fullpkg
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-20 23:05:54 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-20 23:05:54 -0300
commit7d2a691276f60e10c59204631f06fa9c5d6a1c25 (patch)
tree55e348e99e82ba3148f17bf66deb424d07e0bcca /fullpkg
parentfc39fd1e991a4fc6a5aceafc619ca552ad72b582 (diff)
Several fixes. No more 1+ exit
Diffstat (limited to 'fullpkg')
-rwxr-xr-xfullpkg24
1 files changed, 14 insertions, 10 deletions
diff --git a/fullpkg b/fullpkg
index eaf1c63..33dd4f2 100755
--- a/fullpkg
+++ b/fullpkg
@@ -5,7 +5,6 @@
source /etc/makepkg.conf
source /etc/abs.conf
source /etc/libretools.conf
-source /usr/bin/libremessages
# Avoid /libretools dir doesn't exist errors
if [ -z $XDG_CONFIG_HOME ]; then
@@ -187,13 +186,17 @@ function find_deps {
# Increase build level
declare -i next_level=$level+1
+
+# Pass the offline flag to children
+ [[ "$OFFLINE" -eq true ]] && extra+=" -o"
for _dep in ${deps[@]}; do
for _repo in ${REPOS[@]}; do
# try to find $_dep on each repo from dirname
if [ -e "${ABSROOT}/${_repo}/${_dep}/PKGBUILD" ]; then
pushd "${ABSROOT}/${_repo}/${_dep}" > /dev/null
- $0 -c -d ${build_dir} -l ${next_level}
+
+ $0 -c -d ${build_dir} -l ${next_level} ${extra}
# Circular deps must fail
[ $? -eq 20 ] && return 20
@@ -278,7 +281,7 @@ function _pkg_build () {
source .INFO && [ -n $repo ] && {
# Calls a local release script if it's used
- [ -z $HOOKLOCALRELEASE ] || \
+ [ -z "$HOOKLOCALRELEASE" ] || \
$HOOKLOCALRELEASE $repo *.pkg.tar.?z
# Stage for releasing
@@ -287,7 +290,7 @@ function _pkg_build () {
}
msg "Updating pacman db and packages"
- sudo pacman -Syu --noconfirm || true
+ sudo pacman -Sy
}
echo "built:$(basename $PWD)" >> $build_dir/log
@@ -300,10 +303,10 @@ function _pkg_build () {
esac
# Package was built or failed: take it out of $buildorder
- remove_buildorder "${build_packages[0]}" $buildorder
+ remove_buildorder "${build_packages[0]}" $buildorder || true
# Take package out from queue
- remove_queue
+ remove_queue || true
# Set build_packages before next cycle run
build_packages=($(sort -gr $buildorder | cut -d: -f2))
@@ -399,11 +402,12 @@ if [ ${build_only} == 'n' ]; then
usage && exit 1
}
+fi
+
# Add mips64el if missing from arch=() and it isn't an 'any' package
- if ! grep mips64el PKGBUILD >/dev/null; then
- plain "Adding mips64el arch"
- sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" "PKGBUILD"
- fi
+if ! grep mips64el PKGBUILD >/dev/null; then
+ warning "Adding mips64el arch"
+ sed -i "s/^\(arch=([^)anym]\+\))/\1 'mips64el')/" "PKGBUILD"
fi
# Only on level 0