tazpkg rev 862
"get": wget not quiet now; "install": hide 'update-desktop-database' errors; "tazpkg": -gi: check package installed before getting
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Mon Nov 16 02:48:54 2015 +0200 (2015-11-16) |
parents | 602ed53fa812 |
children | f65503bd347b |
files | modules/get modules/install tazpkg |
line diff
1.1 --- a/modules/get Mon Nov 16 02:19:18 2015 +0200 1.2 +++ b/modules/get Mon Nov 16 02:48:54 2015 +0200 1.3 @@ -93,9 +93,9 @@ 1.4 case "$1" in 1.5 # Mirror URL can have a trailing slash or not. 1.6 http://* | https://* | ftp://*) 1.7 - debug " wget -c -q -T 30 -U $UA ${1%/}/$2" 1.8 + debug " wget -c -T 30 -U $UA ${1%/}/$2" 1.9 # TODO: display abridged wget status 1.10 - wget -c -q -T 30 -U $UA ${1%/}/$2 1.11 + wget -c -T 30 -U $UA ${1%/}/$2 1.12 ;; 1.13 *) 1.14 debug " ln -sf ${1%/}/$2 ." 1.15 @@ -181,8 +181,8 @@ 1.16 http://*|https://*|ftp://*) 1.17 # Default 'http://mirror.slitaz.org/packages/cooking/' 1.18 # -> 'http://mirror.slitaz.org/packages/extra/' 1.19 - debug "wget -q -T 30 -U '$UA' '${mirror%packages/*}packages/extra/$converted'" 1.20 - wget -q -T 30 -U "$UA" "${mirror%packages/*}packages/extra/$converted";; 1.21 + debug "wget -T 30 -U '$UA' '${mirror%packages/*}packages/extra/$converted'" 1.22 + wget -T 30 -U "$UA" "${mirror%packages/*}packages/extra/$converted";; 1.23 esac 1.24 if [ -f "$converted" ]; then 1.25 echo "$extra_cache/$converted"; exit 0 1.26 @@ -196,8 +196,8 @@ 1.27 http://*|https://*|ftp://*) 1.28 # Default 'http://mirror.slitaz.org/packages/cooking/' 1.29 # -> 'http://mirror.slitaz.org/packages/get/' 1.30 - debug "wget -q -T 30 -U '$UA' '${mirror%packages/*}packages/get/$1'" 1.31 - wget -q -T 30 -U "$UA" "${mirror%packages/*}packages/get/$1";; 1.32 + debug "wget -T 30 -U '$UA' '${mirror%packages/*}packages/get/$1'" 1.33 + wget -T 30 -U "$UA" "${mirror%packages/*}packages/get/$1";; 1.34 esac 1.35 1.36 if [ ! -f "$1" ]; then
2.1 --- a/modules/install Mon Nov 16 02:19:18 2015 +0200 2.2 +++ b/modules/install Mon Nov 16 02:48:54 2015 +0200 2.3 @@ -530,7 +530,7 @@ 2.4 fi 2.5 2.6 # package 'desktop-file-utils' 2.7 - [ -n "$udesk" ] && chroot "$root/" /usr/bin/update-desktop-database /usr/share/applications 2.8 + [ -n "$udesk" ] && chroot "$root/" /usr/bin/update-desktop-database /usr/share/applications 2>/dev/null 2.9 # package 'shared-mime-info' 2.10 [ -n "$umime" ] && chroot "$root/" /usr/bin/update-mime-database /usr/share/mime 2.11 # packages 'gtk+', 'gtk+3'
3.1 --- a/tazpkg Mon Nov 16 02:19:18 2015 +0200 3.2 +++ b/tazpkg Mon Nov 16 02:48:54 2015 +0200 3.3 @@ -455,6 +455,16 @@ 3.4 check_cmd su pkg; shift 3.5 # Get and install all the packages given on command line 3.6 for i in $@; do 3.7 + 3.8 + awk -F$'\t' -vpv="$i" '$1==pv { exit 1 }' "$PKGS_DB/installed.info" 3.9 + if [ "$?" -eq 1 ]; then 3.10 + newline 3.11 + _ '"%s" package is already installed.' "$(colorize 34 "$i")" 3.12 + longline "$(_ 'You can use the --forced option to force installation.')" 3.13 + newline 3.14 + continue 3.15 + fi 3.16 + 3.17 pkg="$(@@MODULES@@/get $i)" && @@MODULES@@/install "$pkg" 3.18 done 3.19 # Get and install all the packages listed in the file