summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-03-27 23:05:53 -0700
committerJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-03-27 23:05:53 -0700
commitca64f680c48dcc1368aa1eeda530a3a9311ba6fe (patch)
tree6ef536079b006b560be802409dc454418e5e9d64
parentd84746f9cb204617c71e2e4f906ac6fca6feab97 (diff)
Added format to fullpkg and take out second pacman -Sy
-rwxr-xr-xfullpkg26
1 files changed, 14 insertions, 12 deletions
diff --git a/fullpkg b/fullpkg
index b75bf32..074662e 100755
--- a/fullpkg
+++ b/fullpkg
@@ -27,7 +27,7 @@ source /etc/libretools.conf
# Get the queue list from the server
get_queue() {
rsync -e ssh -aq $PARABOLAHOST:mips64el/queue $queue_file >/dev/null 2>&1 || {
- echo ":: Failed to retrieve queue list"
+ error "Failed to retrieve queue list"
return 1
}
}
@@ -35,7 +35,7 @@ get_queue() {
# Put the queue list on the server
put_queue() {
rsync -e ssh -aq $queue_file $PARABOLAHOST:mips64el/queue >/dev/null 2>&1 || {
- echo ":: Failed to put queue list"
+ error "Failed to put queue list"
return 1
}
}
@@ -66,7 +66,7 @@ check_queue() {
packager=$(grep -w "$(basename $PWD)" ${queue_file} | cut -d ':' -f2)
[[ ! -z $packager ]] && [[ "$packager" != "$PACKAGER" ]] && {
- echo ":: $(basename $PWD) is being packaged by $packager. Please wait."
+ warning "$(basename $PWD) is being packaged by $packager. Please wait."
return 1
}
@@ -82,7 +82,7 @@ quit() {
}
source PKGBUILD
-echo ":: Building ${pkgbase} ${pkgname[@]}"
+msg ":: Building ${pkgbase} ${pkgname[@]}"
trap "quit" SIGTERM SIGKILL
@@ -106,8 +106,10 @@ deps=$(echo "${depends[@]} ${makedepends[@]} ${pkgdeps[@]}" | \
tr ' ' "\n" | \
sort -u)
-echo $_deps
+msg "Checking dependencies"
+plain "$_deps"
+msg "Syncing database"
sudo pacman -Sy
for _dep in ${deps[@]}; do
@@ -117,7 +119,7 @@ for _dep in ${deps[@]}; do
# TODO find split packages
[[ -e "$ABSROOT/${_repo}/$_dep/PKGBUILD" ]] && {
cp -r "$ABSROOT/$_repo/$_dep" $tmp_dir/ || {
- echo "Can't copy $_dep to the work dir."
+ error "Can't copy $_dep to the work dir."
exit 1
}
@@ -146,7 +148,7 @@ done
# TODO probably not elegant enough
#[[ ${#failed[@]} -gt 0 ]] || [[ ${#missing[@]} -gt 0 ]] && {
[[ ${#failed[@]} -gt 0 ]] && {
- echo ":: This packages failed to build: ${failed[@]}"
+ error "This packages failed to build: ${failed[@]}"
exit 1
}
@@ -159,24 +161,24 @@ done
# Let everybody know we're building this
update_queue || {
- echo ":: Couldn't update the queue, let your partners know about this."
+ warning "Couldn't update the queue, let your partners know about this."
}
cp -r ../$(basename $PWD) $tmp_dir/
pushd $tmp_dir/$(basename $PWD) >/dev/null
-sudo pacman -Sy
+
makepkg --noconfirm -sLcr ; r=$?
case $r in
0)
- echo "==> The build was succesful."
+ msg "The build was succesful."
mipsrelease *.pkg.tar.*
;;
1)
- echo "==> The build failed."
+ error "The build failed."
;;
2)
- echo "==> The build failed."
+ error "The build failed."
;;
esac