tazpkg diff modules/install @ rev 880
Global quite mode provided by libtaz.sh now; few tweaks.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Dec 04 02:42:03 2015 +0200 (2015-12-04) |
parents | 97454e15c034 |
children | 847a0d1f8f24 |
line diff
1.1 --- a/modules/install Mon Nov 30 02:27:33 2015 +0200 1.2 +++ b/modules/install Fri Dec 04 02:42:03 2015 +0200 1.3 @@ -106,7 +106,7 @@ 1.4 missing_packages="$missing_packages $equiv" 1.5 num=$((num+1)) 1.6 elif [ ! -f "$INSTALLED/$equiv/receipt" ]; then 1.7 - _ 'WARNING! Dependency loop between "%s" and "%s".' "$PACKAGE" "$equiv" 1.8 + [ -z "$quiet" ] && _ 'WARNING! Dependency loop between "%s" and "%s".' "$PACKAGE" "$equiv" 1.9 fi 1.10 done 1.11 1.12 @@ -114,7 +114,7 @@ 1.13 [ -z "$num" ] && return 1.14 1.15 1.16 - qtitle "$(_ 'Tracking dependencies for package "%s"' "$PACKAGE")" 1.17 + title "$(_ 'Tracking dependencies for package "%s"' "$PACKAGE")" 1.18 1.19 # Individual messages for each missing package 1.20 [ -z "$quiet" ] && \ 1.21 @@ -122,7 +122,7 @@ 1.22 _ 'Missing package "%s"' "$pkg" 1.23 done 1.24 1.25 - qfooter "$(_p \ 1.26 + footer "$(_p \ 1.27 '%s missing package to install.' \ 1.28 '%s missing packages to install.' "$num" \ 1.29 "$num")" 1.30 @@ -189,7 +189,7 @@ 1.31 extract_package() { 1.32 # input: $1 - path to package to be extracted; package should be in the current dir 1.33 # ROOT INDEPENDENT 1.34 - qaction 'Extracting package...' 1.35 + action 'Extracting package...' 1.36 1.37 # Extract "outer layer": cpio; remove the original package file 1.38 cpio -idm --quiet < "$1" && rm -f "$1" 1.39 @@ -203,7 +203,7 @@ 1.40 zcat fs.cpio.gz | cpio -idm --quiet && rm fs.cpio.gz 1.41 fi 1.42 1.43 - qstatus 1.44 + status 1.45 } 1.46 1.47 1.48 @@ -249,12 +249,12 @@ 1.49 call_pre_install() { 1.50 local tmp 1.51 if grep -q '^pre_install()' "$1"; then 1.52 - qaction 'Execute pre-install commands...' 1.53 + action 'Execute pre-install commands...' 1.54 tmp="$(mktemp)" 1.55 cp "$1" "$tmp" 1.56 sed -i 's|$1/*$INSTALLED|$INSTALLED|g' "$tmp" 1.57 ( . "$tmp"; pre_install "$root" ) 1.58 - qstatus 1.59 + status 1.60 rm "$tmp" 1.61 fi 1.62 1.63 @@ -263,12 +263,12 @@ 1.64 call_post_install() { 1.65 local tmp 1.66 if grep -q '^post_install()' "$1"; then 1.67 - qaction 'Execute post-install commands...' 1.68 + action 'Execute post-install commands...' 1.69 tmp="$(mktemp)" 1.70 cp "$1" "$tmp" 1.71 sed -i 's|$1/*$INSTALLED|$INSTALLED|g' "$tmp" 1.72 ( . "$tmp"; post_install "$root" ) 1.73 - qstatus 1.74 + status 1.75 rm "$tmp" 1.76 fi 1.77 } 1.78 @@ -333,9 +333,9 @@ 1.79 #[ -n "$INSTALL_LIST" ] && echo "$PACKAGE_FILE" >> "$PKGS_DB/$INSTALL_LIST-processed" 1.80 1.81 if [ -n "$sequence" ]; then 1.82 - qtitle 'Installation of package "%s" (%s)' "$PACKAGE" "$sequence" 1.83 + title 'Installation of package "%s" (%s)' "$PACKAGE" "$sequence" 1.84 else 1.85 - qtitle 'Installation of package "%s"' "$PACKAGE" 1.86 + title 'Installation of package "%s"' "$PACKAGE" 1.87 fi 1.88 1.89 if [ -z "$quiet" ]; then 1.90 @@ -343,9 +343,9 @@ 1.91 separator '-' 1.92 fi 1.93 1.94 - qaction 'Copying package...' 1.95 + action 'Copying package...' 1.96 cp "$PACKAGE_FILE" "$TMP_DIR" 1.97 - qstatus 1.98 + status 1.99 1.100 cd "$TMP_DIR" 1.101 extract_package "$(basename "$PACKAGE_FILE")" 1.102 @@ -373,7 +373,7 @@ 1.103 1.104 1.105 # Remember modified packages 1.106 - qaction 'Remember modified packages...' 1.107 + action 'Remember modified packages...' 1.108 { 1.109 check=false 1.110 # TODO: why '[' the special? 1.111 @@ -419,7 +419,7 @@ 1.112 fi 1.113 echo "$PACKAGE" >> "$dir/modifiers" 1.114 done 1.115 - qstatus 1.116 + status 1.117 1.118 1.119 cd "$TMP_DIR" 1.120 @@ -435,7 +435,7 @@ 1.121 1.122 if [ -n "$CONFIG_FILES" ]; then 1.123 # Save "official" configuration files 1.124 - qaction 'Saving configuration files...' 1.125 + action 'Saving configuration files...' 1.126 debug "\n" 1.127 1.128 cd fs 1.129 @@ -461,12 +461,12 @@ 1.130 done 1.131 fi 1.132 # always '[ Done ]' status, unless '--newconf' is passed or not 1.133 - :; qstatus 1.134 + :; status 1.135 fi 1.136 1.137 1.138 if [ -n "$(ls fs/* 2>/dev/null)" ]; then 1.139 - qaction 'Installing package...' 1.140 + action 'Installing package...' 1.141 1.142 debug '\n resolving destination links in source' 1.143 IFS=$'\n' 1.144 @@ -481,12 +481,12 @@ 1.145 1.146 debug ' copying folders and files to destination' 1.147 cp -af fs/* "$root/" 1.148 - qstatus 1.149 + status 1.150 fi 1.151 1.152 1.153 if [ -s files2remove.list ]; then 1.154 - qaction 'Removing old files...' 1.155 + action 'Removing old files...' 1.156 while read file; do 1.157 dir="$root$file" 1.158 # Remove specified file 1.159 @@ -497,14 +497,14 @@ 1.160 rmdir "$dir" 2>/dev/null || break 1.161 done 1.162 done < files2remove.list 1.163 - :; qstatus 1.164 + :; status 1.165 fi 1.166 1.167 1.168 # Remove the temporary random directory. 1.169 - qaction "Removing all tmp files..." 1.170 + action "Removing all tmp files..." 1.171 cd ..; rm -rf "$TMP_DIR" 1.172 - qstatus 1.173 + status 1.174 1.175 1.176 # Post install commands 1.177 @@ -527,7 +527,7 @@ 1.178 fgrep -q /lib/modules "$fl" && ukrnl='yes' 1.179 1.180 if [ -n "$udesk$umime$uicon$uschm$upixb$ukrnl" ]; then 1.181 - qaction 'Update system databases...' 1.182 + action 'Update system databases...' 1.183 upd=1 1.184 fi 1.185 1.186 @@ -544,7 +544,7 @@ 1.187 # packages 'busybox', 'kmod', 'depmod' 1.188 [ -n "$ukrnl" ] && grep '/lib/modules' "$fl" | cut -d'/' -f4 | uniq | xargs chroot "$root/" /sbin/depmod -a 1.189 1.190 - [ "$upd" -eq 1 ] && qstatus 1.191 + [ "$upd" -eq 1 ] && status 1.192 1.193 1.194 1.195 @@ -565,7 +565,7 @@ 1.196 sort "$ii" > "$TEMP_FILE"; mv -f "$TEMP_FILE" "$ii"; chmod a+r "$ii"; unset ii 1.197 1.198 cd "$CUR_DIR" 1.199 - qfooter "$(_ 'Package "%s" (%s) is installed.' "$PACKAGE" "$VERSION$EXTRAVERSION")" 1.200 + footer "$(_ 'Package "%s" (%s) is installed.' "$PACKAGE" "$VERSION$EXTRAVERSION")" 1.201 1.202 # Log this activity 1.203 log_pkg Installed