wok-current view tazpkg/stuff/upgrade-tazpkg-first.patch @ rev 25691

Add feature to upgrade tazpkg first
author Stanislas Leduc <shann@slitaz.org>
date Sun Mar 17 16:10:19 2024 +0000 (8 months ago)
parents
children
line source
1 --- a/modules/upgrade
2 +++ b/modules/upgrade
3 @@ -105,7 +105,11 @@
4 printf "<td>%s</td>", $2;
5 printf "<td>%s</td></tr>\n", $5;
6 }'
7 - echo '</tbody></table>' ;;
8 + echo '</tbody></table>'
9 + if [[ "$(grep -F 'tazpkg' $UP_LIST)" != '' ]]; then
10 + emsg "<c 31><b>$(_ 'You need upgrade tazpkg first !')</c></b><n>"
11 + emsg "<c 32>$(_ "Select tazpkg only to upgrade it then relaunch 'Upgrade'")</c>"
12 + fi;;
13 *)
14 emsg "<n>$(_ 'Package')<i 26>$(_ 'Repository')<i 38>$(_ 'Version')<i 49>$(_ 'Status')<->"
15 sort -t$'\t' -k1,3 "$tmp_up_list" | awk -F$'\t' \
16 @@ -162,8 +166,15 @@
17 if [ -n "$install" ]; then
18 answer=0
19 else
20 + if [[ "$(grep -F 'tazpkg' $UP_LIST)" != '' ]]; then
21 + answer=2
22 + emsg "<n><c 31>$(_ 'You need upgrade tazpkg first !')</c><n>"
23 + emsg "$(_ "run <c 32>tazpkg -gi tazpkg --forced</c> then relaunch <c 32>tazpkg up -r</c>")<n>"
24 + newline
25 + else
26 confirm "$(_ 'Do you wish to install them now? (y/N)')"
27 answer=$?
28 + fi
29 fi
30 case "$answer" in
31 0)
32 --- a/po/fr.po
33 +++ b/po/fr.po
34 @@ -1303,6 +1303,18 @@
35 msgid "Status"
36 msgstr "Status"
38 +#: modules/upgrade:110 modules/upgrade:173
39 +msgid "You need upgrade tazpkg first !"
40 +msgstr "Vous devez d'abord mettre à jour tazpkg !"
41 +
42 +#: modules/upgrade:111
43 +msgid "Select tazpkg only to upgrade it then relaunch 'Upgrade'"
44 +msgstr "Séléctionner tazpkg seulement pour le mettre à jour et relancer la recherche de mise à jour"
45 +
46 +#: modules/upgrade:175
47 +msgid "run <c 32>tazpkg -gi tazpkg --forced</c> then relaunch <c 32>tazpkg up -r</c>"
48 +msgstr "Lancer <c 32>tazpkg -gi tazpkg --forced</c> puis relancer <c 32>tazpkg up -r</c>"
49 +
50 #: modules/upgrade:115
51 msgid "System is up-to-date..."
52 msgstr "Le système est à jour..."
53 --- a/po/tazpkg.pot
54 +++ b/po/tazpkg.pot
55 @@ -1288,6 +1288,14 @@
56 msgid "Status"
57 msgstr ""
59 +#: modules/upgrade:110 modules/upgrade:173
60 +msgid "You need upgrade tazpkg first !"
61 +msgstr ""
62 +
63 +#: modules/upgrade:175
64 +msgid "run <c 32>tazpkg -gi tazpkg --forced</c> then relaunch <c 32>tazpkg up -r</c>"
65 +msgstr ""
66 +
67 #: modules/upgrade:115
68 msgid "System is up-to-date..."
69 msgstr ""