tazpkg rev 116
Install dependancies *before* package
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 04 17:58:37 2008 +0000 (2008-07-04) |
parents | 9e6adc3b16a1 |
children | 5c2f855b190a |
files | tazpkg |
line diff
1.1 --- a/tazpkg Thu Jul 03 19:43:52 2008 +0000 1.2 +++ b/tazpkg Fri Jul 04 17:58:37 2008 +0000 1.3 @@ -321,6 +321,13 @@ 1.4 # Check for missing deps listed in a receipt packages. 1.5 check_for_deps() 1.6 { 1.7 + local saved; 1.8 + saved=$PACKAGE 1.9 + mkdir -p $TMP_DIR 1.10 + ( cd $TMP_DIR ; cpio -i receipt ) < $PACKAGE_FILE 1.11 + . $TMP_DIR/receipt 1.12 + PACKAGE=$saved 1.13 + rm -rf $TMP_DIR 1.14 for i in $DEPENDS 1.15 do 1.16 if [ ! -d "$INSTALLED/$i" ]; then 1.17 @@ -880,12 +887,12 @@ 1.18 if [ "$DO_CHECK" = "yes" ]; then 1.19 check_for_installed_package 1.20 fi 1.21 - install_package 1.22 # Resolv package deps. 1.23 check_for_deps 1.24 if [ ! "$MISSING_PACKAGE" = "" ]; then 1.25 install_deps 1.26 fi 1.27 + install_package 1.28 ;; 1.29 install-list|get-install-list) 1.30 # Install a set of packages from a list. 1.31 @@ -1434,11 +1441,11 @@ 1.32 download $PACKAGE.tazpkg 1.33 fi 1.34 PACKAGE_FILE=$CACHE_DIR/$PACKAGE.tazpkg 1.35 - install_package 1.36 check_for_deps 1.37 if [ ! "$MISSING_PACKAGE" = "" ]; then 1.38 install_deps 1.39 fi 1.40 + install_package 1.41 ;; 1.42 clean-cache) 1.43 # Remove all downloaded packages.