tazpkg rev 434 4.3
Merge changes from default into 4.3
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Fri Mar 04 15:57:33 2011 +0100 (2011-03-04) |
parents | b7bcf8431c9c 0bc0cd627417 |
children | 62e749776c9e |
files | tazpkg |
line diff
1.1 --- a/tazpkg Fri Mar 04 03:35:58 2011 +0100 1.2 +++ b/tazpkg Fri Mar 04 15:57:33 2011 +0100 1.3 @@ -41,14 +41,15 @@ 1.4 # Initialize some variables to use words rather than numbers for functions 1.5 # and actions. 1.6 COMMAND=$1 1.7 -if [ -f "$2" ]; then 1.8 +PACKAGE=${2%/} 1.9 +PACKAGE_FILE="$PWD/$PACKAGE" 1.10 +if [ -f "$PACKAGE" ]; then 1.11 # Set pkg basename for install, extract 1.12 - PACKAGE=$(basename ${2%.tazpkg} 2>/dev/null) 1.13 + PACKAGE=$(basename ${PACKAGE%.tazpkg} 2>/dev/null) 1.14 else 1.15 # Pkg name for remove, search and all other cmds 1.16 - PACKAGE=${2%.tazpkg} 1.17 + PACKAGE=${PACKAGE%.tazpkg} 1.18 fi 1.19 -PACKAGE_FILE="$PWD/$2" 1.20 TARGET_DIR=$3 1.21 TOP_DIR=`pwd` 1.22 TMP_DIR=$tmp/$RANDOM 1.23 @@ -1915,7 +1916,7 @@ 1.24 do 1.25 for mod in `cat $ROOT$INSTALLED/$PACKAGE/modifiers` 1.26 do 1.27 - [ $(grep "^$(echo $file | grepesc)$" $ROOT$INSTALLED/$mod/files.list | wc -l) -gt 1 ] && continue 2 1.28 + [ -f $ROOT$INSTALLED/$mod/files.list ] && [ $(grep "^$(echo $file | grepesc)$" $ROOT$INSTALLED/$mod/files.list | wc -l) -gt 1 ] && continue 2 1.29 done 1.30 remove_with_path $ROOT$file 1.31 done 1.32 @@ -2872,6 +2873,10 @@ 1.33 convert) 1.34 # convert misc package format to .tazpkg 1.35 check_for_package_file 1.36 + if [ "$(dd if=$PACKAGE_FILE bs=8 count=1 skip=1 2> /dev/null)" \ 1.37 + == "debian-b" ]; then 1.38 + convert_deb 1.39 + else 1.40 case "$PACKAGE_FILE" in 1.41 *.deb|*.udeb) 1.42 convert_deb;; 1.43 @@ -2885,7 +2890,8 @@ 1.44 convert_ipk;; 1.45 *) 1.46 gettext "Unsupported format"; echo ;; 1.47 - esac ;; 1.48 + esac 1.49 + fi ;; 1.50 link) 1.51 # link a package from another slitaz installation 1.52 PACKAGE=$2