# HG changeset patch # User Stanislas Leduc # Date 1710691819 0 # Node ID be0bd7139d99eb1f4594ccd3ce5d72da1a8280cb # Parent 3fc17db61bce554cce381b4c5305afc75972d9ff Add feature to upgrade tazpkg first diff -r 3fc17db61bce -r be0bd7139d99 tazpkg/receipt --- a/tazpkg/receipt Fri Mar 15 08:30:29 2024 +0000 +++ b/tazpkg/receipt Sun Mar 17 16:10:19 2024 +0000 @@ -50,6 +50,9 @@ cp -a $stuff/checkspace $stuff/getall modules/ patch -p1 < $stuff/checkspace-module.patch patch -p1 < $stuff/getall-module.patch + + # Patch for upgrade tazpkg first + patch -p1 < $stuff/upgrade-tazpkg-first.patch rm modules/upgrade.orig sed -i 's|\. receipt|. ./receipt|' */* diff -r 3fc17db61bce -r be0bd7139d99 tazpkg/stuff/upgrade-tazpkg-first.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tazpkg/stuff/upgrade-tazpkg-first.patch Sun Mar 17 16:10:19 2024 +0000 @@ -0,0 +1,69 @@ +--- a/modules/upgrade ++++ b/modules/upgrade +@@ -105,7 +105,11 @@ + printf "%s", $2; + printf "%s\n", $5; + }' +- echo '' ;; ++ echo '' ++ if [[ "$(grep -F 'tazpkg' $UP_LIST)" != '' ]]; then ++ emsg "$(_ 'You need upgrade tazpkg first !')" ++ emsg "$(_ "Select tazpkg only to upgrade it then relaunch 'Upgrade'")" ++ fi;; + *) + emsg "$(_ 'Package')$(_ 'Repository')$(_ 'Version')$(_ 'Status')<->" + sort -t$'\t' -k1,3 "$tmp_up_list" | awk -F$'\t' \ +@@ -162,8 +166,15 @@ + if [ -n "$install" ]; then + answer=0 + else ++ if [[ "$(grep -F 'tazpkg' $UP_LIST)" != '' ]]; then ++ answer=2 ++ emsg "$(_ 'You need upgrade tazpkg first !')" ++ emsg "$(_ "run tazpkg -gi tazpkg --forced then relaunch tazpkg up -r")" ++ newline ++ else + confirm "$(_ 'Do you wish to install them now? (y/N)')" + answer=$? ++ fi + fi + case "$answer" in + 0) +--- a/po/fr.po ++++ b/po/fr.po +@@ -1303,6 +1303,18 @@ + msgid "Status" + msgstr "Status" + ++#: modules/upgrade:110 modules/upgrade:173 ++msgid "You need upgrade tazpkg first !" ++msgstr "Vous devez d'abord mettre à jour tazpkg !" ++ ++#: modules/upgrade:111 ++msgid "Select tazpkg only to upgrade it then relaunch 'Upgrade'" ++msgstr "Séléctionner tazpkg seulement pour le mettre à jour et relancer la recherche de mise à jour" ++ ++#: modules/upgrade:175 ++msgid "run tazpkg -gi tazpkg --forced then relaunch tazpkg up -r" ++msgstr "Lancer tazpkg -gi tazpkg --forced puis relancer tazpkg up -r" ++ + #: modules/upgrade:115 + msgid "System is up-to-date..." + msgstr "Le système est à jour..." +--- a/po/tazpkg.pot ++++ b/po/tazpkg.pot +@@ -1288,6 +1288,14 @@ + msgid "Status" + msgstr "" + ++#: modules/upgrade:110 modules/upgrade:173 ++msgid "You need upgrade tazpkg first !" ++msgstr "" ++ ++#: modules/upgrade:175 ++msgid "run tazpkg -gi tazpkg --forced then relaunch tazpkg up -r" ++msgstr "" ++ + #: modules/upgrade:115 + msgid "System is up-to-date..." + msgstr ""