wok-current rev 25691
Add feature to upgrade tazpkg first
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Mar 17 16:10:19 2024 +0000 (9 months ago) |
parents | 3fc17db61bce |
children | 1311d447e004 |
files | tazpkg/receipt tazpkg/stuff/upgrade-tazpkg-first.patch |
line diff
1.1 --- a/tazpkg/receipt Fri Mar 15 08:30:29 2024 +0000 1.2 +++ b/tazpkg/receipt Sun Mar 17 16:10:19 2024 +0000 1.3 @@ -50,6 +50,9 @@ 1.4 cp -a $stuff/checkspace $stuff/getall modules/ 1.5 patch -p1 < $stuff/checkspace-module.patch 1.6 patch -p1 < $stuff/getall-module.patch 1.7 + 1.8 + # Patch for upgrade tazpkg first 1.9 + patch -p1 < $stuff/upgrade-tazpkg-first.patch 1.10 rm modules/upgrade.orig 1.11 1.12 sed -i 's|\. receipt|. ./receipt|' */*
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/tazpkg/stuff/upgrade-tazpkg-first.patch Sun Mar 17 16:10:19 2024 +0000 2.3 @@ -0,0 +1,69 @@ 2.4 +--- a/modules/upgrade 2.5 ++++ b/modules/upgrade 2.6 +@@ -105,7 +105,11 @@ 2.7 + printf "<td>%s</td>", $2; 2.8 + printf "<td>%s</td></tr>\n", $5; 2.9 + }' 2.10 +- echo '</tbody></table>' ;; 2.11 ++ echo '</tbody></table>' 2.12 ++ if [[ "$(grep -F 'tazpkg' $UP_LIST)" != '' ]]; then 2.13 ++ emsg "<c 31><b>$(_ 'You need upgrade tazpkg first !')</c></b><n>" 2.14 ++ emsg "<c 32>$(_ "Select tazpkg only to upgrade it then relaunch 'Upgrade'")</c>" 2.15 ++ fi;; 2.16 + *) 2.17 + emsg "<n>$(_ 'Package')<i 26>$(_ 'Repository')<i 38>$(_ 'Version')<i 49>$(_ 'Status')<->" 2.18 + sort -t$'\t' -k1,3 "$tmp_up_list" | awk -F$'\t' \ 2.19 +@@ -162,8 +166,15 @@ 2.20 + if [ -n "$install" ]; then 2.21 + answer=0 2.22 + else 2.23 ++ if [[ "$(grep -F 'tazpkg' $UP_LIST)" != '' ]]; then 2.24 ++ answer=2 2.25 ++ emsg "<n><c 31>$(_ 'You need upgrade tazpkg first !')</c><n>" 2.26 ++ emsg "$(_ "run <c 32>tazpkg -gi tazpkg --forced</c> then relaunch <c 32>tazpkg up -r</c>")<n>" 2.27 ++ newline 2.28 ++ else 2.29 + confirm "$(_ 'Do you wish to install them now? (y/N)')" 2.30 + answer=$? 2.31 ++ fi 2.32 + fi 2.33 + case "$answer" in 2.34 + 0) 2.35 +--- a/po/fr.po 2.36 ++++ b/po/fr.po 2.37 +@@ -1303,6 +1303,18 @@ 2.38 + msgid "Status" 2.39 + msgstr "Status" 2.40 + 2.41 ++#: modules/upgrade:110 modules/upgrade:173 2.42 ++msgid "You need upgrade tazpkg first !" 2.43 ++msgstr "Vous devez d'abord mettre à jour tazpkg !" 2.44 ++ 2.45 ++#: modules/upgrade:111 2.46 ++msgid "Select tazpkg only to upgrade it then relaunch 'Upgrade'" 2.47 ++msgstr "Séléctionner tazpkg seulement pour le mettre à jour et relancer la recherche de mise à jour" 2.48 ++ 2.49 ++#: modules/upgrade:175 2.50 ++msgid "run <c 32>tazpkg -gi tazpkg --forced</c> then relaunch <c 32>tazpkg up -r</c>" 2.51 ++msgstr "Lancer <c 32>tazpkg -gi tazpkg --forced</c> puis relancer <c 32>tazpkg up -r</c>" 2.52 ++ 2.53 + #: modules/upgrade:115 2.54 + msgid "System is up-to-date..." 2.55 + msgstr "Le système est à jour..." 2.56 +--- a/po/tazpkg.pot 2.57 ++++ b/po/tazpkg.pot 2.58 +@@ -1288,6 +1288,14 @@ 2.59 + msgid "Status" 2.60 + msgstr "" 2.61 + 2.62 ++#: modules/upgrade:110 modules/upgrade:173 2.63 ++msgid "You need upgrade tazpkg first !" 2.64 ++msgstr "" 2.65 ++ 2.66 ++#: modules/upgrade:175 2.67 ++msgid "run <c 32>tazpkg -gi tazpkg --forced</c> then relaunch <c 32>tazpkg up -r</c>" 2.68 ++msgstr "" 2.69 ++ 2.70 + #: modules/upgrade:115 2.71 + msgid "System is up-to-date..." 2.72 + msgstr ""