diff options
author | Dan McGee <dan@archlinux.org> | 2007-03-20 03:13:44 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-03-20 03:13:44 +0100 |
commit | 0fa7d47a4da849c1346a63a8d4327c253ef0a0e6 (patch) | |
tree | 5658bcb99c3b253c79efea5455697c2208d7f7e4 | |
parent | b882f463dff081529801809b46df28bb30b86d9b (diff) | |
download | pacman-0fa7d47a4da849c1346a63a8d4327c253ef0a0e6.tar.gz pacman-0fa7d47a4da849c1346a63a8d4327c253ef0a0e6.tar.xz |
* makepkg: a few more changes to get dependencies working correctly. If a
user does not install all required dependencies, makepkg will now bail.
-rwxr-xr-x | scripts/makepkg | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/scripts/makepkg b/scripts/makepkg index d307e393..dfa167ec 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -217,7 +217,7 @@ handledeps() { fi sudo pacman $PACMAN_OPTS -S $striplist if [ $? -eq 1 ]; then - error "Failed to install missing dependencies." + error "Pacman failed to install missing dependencies." exit 1 fi if [ "$INFAKEROOT" = "1" ]; then @@ -229,7 +229,7 @@ handledeps() { msg "Installing missing dependencies..." pacman $PACMAN_OPTS -S $striplist if [ $? -eq 1 ]; then - error "Failed to install missing dependencies." + error "Pacman failed to install missing dependencies." exit 1 fi elif [ "$DEP_SRC" = "1" ]; then @@ -290,18 +290,24 @@ handledeps() { } resolvedeps() { + deplist="" + newdeplist="" + deplist=$(checkdeps $*) if [ -n "${deplist}" ]; then handledeps $deplist if [ $? -eq 0 ]; then # check deps again to make sure they were resolved - newdeplist=$(checkdeps ${depends[@]}) + newdeplist=$(checkdeps $*) if [ -n "${newdeplist}" ]; then - error "Failed to install missing dependencies." + error "Failed to install all missing dependencies." fi + else + newdeplist="$deplist" fi fi + # if new dep list is not empty, print the list if [ -n "${newdeplist}" ]; then msg "Missing Dependencies:" for dep in ${newdeplist}; do @@ -315,8 +321,8 @@ resolvedeps() { # fix flyspray bug #5923 removedeps() { - # runtimedeps and makedeps are set when resolving deps - local deplist="$runtimedeps $makedeps" + # runtimedeps and buildtimedeps are set when resolving deps + local deplist="$runtimedeps $buildtimedeps" local depstrip="" local striplist="" @@ -623,21 +629,23 @@ if [ "$NODEPS" = "1" -o "$GENINTEG" = "1" -o "$NOBUILD" = "1" -o "$REPKG" = "1" elif [ $(type -p pacman) ]; then deperr=0 # these two variables are needed later by removedeps - unset runtimedeps makedeps + unset runtimedeps buildtimedeps msg "Checking Runtime Dependencies..." resolvedeps ${depends[@]} + ret=$? # deplist is a global variable set by resolvedeps runtimedeps="$deplist" - if [ $? -ne 0 ]; then + if [ "$ret" != "0" ]; then deperr=1 fi msg "Checking Buildtime Dependencies..." resolvedeps ${makedepends[@]} + ret=$? # deplist is a global variable set by resolvedeps - makedeps="$deplist" - if [ $? -ne 0 ]; then + buildtimedeps="$deplist" + if [ "$ret" != "0" ]; then deperr=1 fi |