wok-current annotate tazpkg/stuff/checkspace-module.patch @ rev 25685

Add checkspace / fetchall feature for tazpkg
author Stanislas Leduc <shann@slitaz.org>
date Thu Mar 14 20:28:39 2024 +0000 (18 months ago)
parents
children ece35c6e0e49
rev   line source
shann@25685 1 --- a/modules/upgrade
shann@25685 2 +++ b/modules/upgrade
shann@25685 3 @@ -16,6 +16,9 @@
shann@25685 4 # Get TazPkg working environment
shann@25685 5 . @@MODULES@@/getenv
shann@25685 6
shann@25685 7 +# Get TazPkg checkspace module
shann@25685 8 +. @@MODULES@@/checkspace
shann@25685 9 +
shann@25685 10 time="$(date +%s)"
shann@25685 11
shann@25685 12 # Recharge packages databases (if necessary) (respects already exported "root" value)
shann@25685 13 @@ -114,6 +122,7 @@
shann@25685 14 install="n"
shann@25685 15 _ 'System is up-to-date...'
shann@25685 16 else
shann@25685 17 + spaceneed=$(check_space)
shann@25685 18 blocked_count=$(wc -m < "$blocked_counter")
shann@25685 19
shann@25685 20 blocked=$(_p \
shann@25685 21 @@ -131,6 +139,10 @@
shann@25685 22 '%s installed packages scanned in %ds' "$pkgs" \
shann@25685 23 "<c 32>$pkgs</c>" "$time")"
shann@25685 24
shann@25685 25 +emsg "$(_p \
shann@25685 26 + 'You need %s free space' \
shann@25685 27 + 'You need %s free space' "$spaceneed" \
shann@25685 28 + "<c 32>$spaceneed</c>")"
shann@25685 29
shann@25685 30 # Clean
shann@25685 31 rm "$blocked_counter" "$tmp_up_list"