diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-06-20 23:05:54 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-06-20 23:05:54 -0300 |
commit | 7d2a691276f60e10c59204631f06fa9c5d6a1c25 (patch) | |
tree | 55e348e99e82ba3148f17bf66deb424d07e0bcca | |
parent | fc39fd1e991a4fc6a5aceafc619ca552ad72b582 (diff) |
Several fixes. No more 1+ exit
-rwxr-xr-x | fullpkg | 24 | ||||
-rwxr-xr-x | mipsrelease | 2 |
2 files changed, 15 insertions, 11 deletions
@@ -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 diff --git a/mipsrelease b/mipsrelease index a21eaec..22d0866 100755 --- a/mipsrelease +++ b/mipsrelease @@ -37,7 +37,7 @@ repo-add ${PKGDEST}/stage3.db.tar.gz $@ # Get all needed sources source PKGBUILD fullver=$(get_full_version ${epoch:-0} ${pkgver} ${pkgrel}) -makepkg --source +makepkg --source -f mkdir -p ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null |