wok-current view tazpkg/stuff/checkspace-module.patch @ rev 25686
Rework tazpkg getall/checkspace feature
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri Mar 15 07:15:01 2024 +0000 (18 months ago) |
parents | 3c2b1b2d0d59 |
children | 3fc17db61bce |
line source
1 --- a/modules/upgrade
2 +++ b/modules/upgrade
3 @@ -16,6 +16,9 @@
4 # Get TazPkg working environment
5 . @@MODULES@@/getenv
7 +# Get TazPkg checkspace module
8 +. @@MODULES@@/checkspace
9 +
10 time="$(date +%s)"
12 # Recharge packages databases (if necessary) (respects already exported "root" value)
13 @@ -114,6 +122,7 @@
14 install="n"
15 _ 'System is up-to-date...'
16 else
17 + spaceneed=$(check_space)
18 blocked_count=$(wc -m < "$blocked_counter")
20 blocked=$(_p \
21 @@ -131,6 +139,10 @@
22 '%s installed packages scanned in %ds' "$pkgs" \
23 "<c 32>$pkgs</c>" "$time")"
25 +emsg "$(_p \
26 + 'You need %s free space.' \
27 + 'You need %s free space.' "$spaceneed" \
28 + "<c 32>$spaceneed</c>")"
30 # Clean
31 rm "$blocked_counter" "$tmp_up_list"
32 --- a/po/fr.po
33 +++ b/po/fr.po
34 @@ -1329,6 +1329,10 @@
35 msgid "Do you wish to install them now? (y/N)"
36 msgstr "Voulez-vous les installer maintenant ? (o/N)"
38 +#: modules/upgrade:147
39 +msgid "You need %s free space."
40 +msgstr "Vous avez besoin de %s d'espace libre."
41 +
42 #: modules/upgrade:157
43 msgid "Leaving without any upgrades installed."
44 msgstr "Sortie sans avoir installé de mise à jour."
45 --- a/po/tazpkg.pot
46 +++ b/po/tazpkg.pot
47 @@ -1314,6 +1314,10 @@
48 msgid "Do you wish to install them now? (y/N)"
49 msgstr ""
51 +#: modules/upgrade:147
52 +msgid "You need %s free space."
53 +msgstr ""
54 +
55 #: modules/upgrade:157
56 msgid "Leaving without any upgrades installed."
57 msgstr ""