tazpkg rev 471
Arf ust tagued and must push some some fix due to tazpkg change and new packages.up
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Apr 08 17:58:27 2011 +0200 (2011-04-08) |
parents | c441556c981e |
children | d76a68a31de0 |
files | Makefile tazpkg-notify |
line diff
1.1 --- a/Makefile Fri Apr 08 17:15:41 2011 +0200 1.2 +++ b/Makefile Fri Apr 08 17:58:27 2011 +0200 1.3 @@ -25,6 +25,11 @@ 1.4 @for l in $(LINGUAS); do \ 1.5 echo -n "Updating $$l po file."; \ 1.6 msgmerge -U po/tazpkg/$$l.po po/tazpkg/tazpkg.pot ; \ 1.7 + echo -n "Updating $$l po file."; \ 1.8 + if [ -f "po/tazpkg-notify/$$l.po" ]; then; \ 1.9 + msgmerge -U po/tazpkg-notify/$$l.po \ 1.10 + po/tazpkg-notify/tazpkg-notify.pot; \ 1.11 + fi; \ 1.12 done; 1.13 1.14 msgfmt:
2.1 --- a/tazpkg-notify Fri Apr 08 17:15:41 2011 +0200 2.2 +++ b/tazpkg-notify Fri Apr 08 17:58:27 2011 +0200 2.3 @@ -22,7 +22,7 @@ 2.4 TEXTDOMAIN='tazpkg-notify' 2.5 export TEXTDOMAIN 2.6 2.7 -up=`cat $LOCALSTATE/upgradeable-packages.list | wc -l` 2.8 +up=`cat $LOCALSTATE/packages.up | wc -l` 2.9 rel=`cat /etc/slitaz-release` 2.10 2.11 # Kill the notification icon after user pressed on it. 2.12 @@ -33,16 +33,16 @@ 2.13 done 2.14 } 2.15 2.16 -# Message for upgradeable 2.17 -upgradeable_msg() { 2.18 - eval_gettext "<b>There is \$up upgradeable packages for your SliTaz \$ver</b> 2.19 +# Message for up 2.20 +up_msg() { 2.21 + eval_gettext "<b>There is \$up upgradeable packages for your SliTaz \$rel</b> 2.22 You should upgrade your system to get all latest fixes 2.23 and improvments from SliTaz contributors" 2.24 } 2.25 2.26 # Message for list older than 10 days 2.27 old_list_msg() { 2.28 - eval_gettext "<b>Your SliTaz \$ver packages list is older than 10 days.</b> 2.29 + eval_gettext "<b>Your SliTaz \$rel packages list is older than 10 days.</b> 2.30 You should recharge the list to check for updates" 2.31 } 2.32 2.33 @@ -54,9 +54,9 @@ 2.34 } 2.35 2.36 # 2.37 -# Main GUI box for upgradeable packages 2.38 +# Main GUI box for up packages 2.39 # 2.40 -upgradeable_main() { 2.41 +up_main() { 2.42 yad --text --width=400 \ 2.43 --geometry="$NOTIFY_GEOM" \ 2.44 --undecorated \ 2.45 @@ -64,29 +64,29 @@ 2.46 --image="tazpkg" \ 2.47 --image-on-top \ 2.48 --on-top \ 2.49 - --text="`upgradeable_msg`" \ 2.50 + --text="`up_msg`" \ 2.51 --button="`gettext \"Upgrade:2\"`" \ 2.52 --button="gtk-close:1" 2.53 } 2.54 2.55 -# Notification icon for upgradeable packages 2.56 -upgradeable_notify() { 2.57 +# Notification icon for up packages 2.58 +up_notify() { 2.59 yad --notification \ 2.60 --image=tazpkg \ 2.61 - --text="`upgradeable_msg`" \ 2.62 + --text="`up_msg`" \ 2.63 --command="tazpkg-notify upgrade" 2.64 } 2.65 2.66 -# Main upgradeable function 2.67 -upgradeable() { 2.68 +# Main up function 2.69 +up() { 2.70 # Store box results 2.71 - main=`upgradeable_main` 2.72 + main=`up_main` 2.73 ret=$? 2.74 kill_notification 2.75 # Deal with --button values 2.76 case $ret in 2.77 1) exit 0 ;; 2.78 - #tazweb http://tazpanel:8090/pkgs.cgi?upgradeable & 2.79 + #tazweb http://tazpanel:8090/pkgs.cgi?up & 2.80 2) subox tazpkgbox & ;; 2.81 *) continue ;; 2.82 esac 2.83 @@ -177,7 +177,7 @@ 2.84 2.85 case $1 in 2.86 upgrade) 2.87 - upgradeable ;; 2.88 + up ;; 2.89 old-list) 2.90 old_list ;; 2.91 no-list) 2.92 @@ -186,8 +186,8 @@ 2.93 # Sleep first to let tazpkg upgrade on boot finish. Check if 2.94 # any upgrade, then for an old list and then if any list at all 2.95 # (live or first boot) 2.96 - #sleep 15 2.97 - [ "$up" -gt 0 ] && upgradeable_notify && exit 0 2.98 + sleep 10 2.99 + [ "$up" -gt 0 ] && up_notify && exit 0 2.100 mtime=`find /var/lib/tazpkg/packages.list -mtime +10;` 2.101 [ "$mtime" ] && old_list_notify && exit 0 2.102 [ ! -f $LOCALSTATE/packages.list ] && no_list_notify \