# HG changeset patch # User Aleksej Bobylev # Date 1447634934 -7200 # Node ID 8c6346ff1cefcd6212bec7016dff7c8b7ddf89c3 # Parent 602ed53fa8126bf16ae5679e357892bf5c496a73 "get": wget not quiet now; "install": hide 'update-desktop-database' errors; "tazpkg": -gi: check package installed before getting diff -r 602ed53fa812 -r 8c6346ff1cef modules/get --- a/modules/get Mon Nov 16 02:19:18 2015 +0200 +++ b/modules/get Mon Nov 16 02:48:54 2015 +0200 @@ -93,9 +93,9 @@ case "$1" in # Mirror URL can have a trailing slash or not. http://* | https://* | ftp://*) - debug " wget -c -q -T 30 -U $UA ${1%/}/$2" + debug " wget -c -T 30 -U $UA ${1%/}/$2" # TODO: display abridged wget status - wget -c -q -T 30 -U $UA ${1%/}/$2 + wget -c -T 30 -U $UA ${1%/}/$2 ;; *) debug " ln -sf ${1%/}/$2 ." @@ -181,8 +181,8 @@ http://*|https://*|ftp://*) # Default 'http://mirror.slitaz.org/packages/cooking/' # -> 'http://mirror.slitaz.org/packages/extra/' - debug "wget -q -T 30 -U '$UA' '${mirror%packages/*}packages/extra/$converted'" - wget -q -T 30 -U "$UA" "${mirror%packages/*}packages/extra/$converted";; + debug "wget -T 30 -U '$UA' '${mirror%packages/*}packages/extra/$converted'" + wget -T 30 -U "$UA" "${mirror%packages/*}packages/extra/$converted";; esac if [ -f "$converted" ]; then echo "$extra_cache/$converted"; exit 0 @@ -196,8 +196,8 @@ http://*|https://*|ftp://*) # Default 'http://mirror.slitaz.org/packages/cooking/' # -> 'http://mirror.slitaz.org/packages/get/' - debug "wget -q -T 30 -U '$UA' '${mirror%packages/*}packages/get/$1'" - wget -q -T 30 -U "$UA" "${mirror%packages/*}packages/get/$1";; + debug "wget -T 30 -U '$UA' '${mirror%packages/*}packages/get/$1'" + wget -T 30 -U "$UA" "${mirror%packages/*}packages/get/$1";; esac if [ ! -f "$1" ]; then diff -r 602ed53fa812 -r 8c6346ff1cef modules/install --- a/modules/install Mon Nov 16 02:19:18 2015 +0200 +++ b/modules/install Mon Nov 16 02:48:54 2015 +0200 @@ -530,7 +530,7 @@ fi # package 'desktop-file-utils' - [ -n "$udesk" ] && chroot "$root/" /usr/bin/update-desktop-database /usr/share/applications + [ -n "$udesk" ] && chroot "$root/" /usr/bin/update-desktop-database /usr/share/applications 2>/dev/null # package 'shared-mime-info' [ -n "$umime" ] && chroot "$root/" /usr/bin/update-mime-database /usr/share/mime # packages 'gtk+', 'gtk+3' diff -r 602ed53fa812 -r 8c6346ff1cef tazpkg --- a/tazpkg Mon Nov 16 02:19:18 2015 +0200 +++ b/tazpkg Mon Nov 16 02:48:54 2015 +0200 @@ -455,6 +455,16 @@ check_cmd su pkg; shift # Get and install all the packages given on command line for i in $@; do + + awk -F$'\t' -vpv="$i" '$1==pv { exit 1 }' "$PKGS_DB/installed.info" + if [ "$?" -eq 1 ]; then + newline + _ '"%s" package is already installed.' "$(colorize 34 "$i")" + longline "$(_ 'You can use the --forced option to force installation.')" + newline + continue + fi + pkg="$(@@MODULES@@/get $i)" && @@MODULES@@/install "$pkg" done # Get and install all the packages listed in the file