summaryrefslogtreecommitdiff
path: root/fullpkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-27 00:16:33 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-06-27 00:16:33 -0500
commit0097ea36511596b3de1947a2069d708079887058 (patch)
treed51c39b4742ede735a2ecf8fd8315a2f1c5cc6d2 /fullpkg
parent8e4aa31eb303dc0086e9a4f535efda9a6d3939e0 (diff)
"first working prtools + fixes"
Diffstat (limited to 'fullpkg')
-rwxr-xr-xfullpkg21
1 files changed, 8 insertions, 13 deletions
diff --git a/fullpkg b/fullpkg
index c25ed85..7a08112 100755
--- a/fullpkg
+++ b/fullpkg
@@ -11,7 +11,7 @@ if [ -z $XDG_CONFIG_HOME ]; then
error "There's no XDG_CONFIG_HOME var set"
exit 1
fi
-# set and ban_file
+# set ban_file
[ -e $XDG_CONFIG_HOME/libretools/libretools.conf ] && \
source $XDG_CONFIG_HOME/libretools/libretools.conf
ban_file=$XDG_CONFIG_HOME/libretools/ban
@@ -35,6 +35,7 @@ function usage {
echo " -m max_level : check deps until this level"
echo " -r \"command\" : use this instead of \"$FULLBUILDCMD\""
echo
+ exit 1
}
## Build order management ##
@@ -89,7 +90,6 @@ function find_deps {
local fullver=$(get_full_version ${epoch} ${pkgver} ${pkgrel})
# If package and correct ${fullver} is built exit
-# TODO?: If this package is in force_build: skip this step
if is_built "${pkgbase}>=${fullver}"; then
exit 0
fi
@@ -121,9 +121,6 @@ function find_deps {
# Increase build level
declare -i next_level=$level+1
-# Pass the offline flag to children
- [[ "$OFFLINE" -eq true ]]
-
for _dep in ${deps[@]}; do
for _repo in ${REPOS[@]}; do
# try to find $_dep on each repo from dirname
@@ -136,10 +133,11 @@ function find_deps {
[ $? -eq 20 ] && return 20
popd > /dev/null
break 1 # found, go to next dep
-
+ done
# if search pkgname in repo doesn't work
# this should find pkgsplits
- elif _dir=($(find "$ABSROOT/${_repo}" -type f -name PKGBUILD -print0 2>/dev/null | \
+ for _repo in ${REPOS[@]}; do
+ if _dir=($(find "$ABSROOT/${_repo}" -type f -name PKGBUILD -print0 2>/dev/null | \
"xargs" -0 -e grep -HEw "pkgname=|pkgbase=|provides=" | grep -w "$_dep" 2>&1));
then
_dir=$(dirname $(echo $_dir | cut -d: -f1))
@@ -150,7 +148,6 @@ function find_deps {
[ $? -eq 20 ] && return 20
popd > /dev/null
break 1 # found, go to next dep
-
else
echo "dep_not_found:$_dep:$_repo" >> $build_dir/log
fi
@@ -278,15 +275,14 @@ check_deps_only='n'
do_cleanup='n'
max_level=21
OFFLINE=false
-while getopts 'ha:b:cCd:l:nm:r:o' arg; do
+while getopts 'ha:b:cCd:l:nm:r:' arg; do
case $arg in
- h) usage; exit 0 ;;
+ h) usage ;;
a) ABSROOT="$OPTARG" ;;
b) build_only='y'
build_dir="$OPTARG"
[ -z ${build_dir} ] && {
usage
- exit 1
}
[ ! -r ${build_dir}/BUILDORDER ] && {
error "${build_dir}/BUILDORDER doesn't exist."
@@ -301,7 +297,6 @@ while getopts 'ha:b:cCd:l:nm:r:o' arg; do
n) noupdate='y';;
m) max_level=$OPTARG ;;
r) FULLBUILDCMD="$OPTARG" ;;
- o) OFFLINE=true ;;
esac
done
@@ -312,7 +307,7 @@ if [ ${build_only} == 'n' ]; then
[ ! -r PKGBUILD ] && {
error "This isn't a build directory"
- usage && exit 1
+ usage
}
# Add mips64el if missing from arch=() and it isn't an 'any' package