diff options
author | Frederic Crozat <fcrozat@mandriva.com> | 2006-10-26 16:04:10 +0000 |
---|---|---|
committer | Frederic Crozat <fcrozat@mandriva.com> | 2006-10-26 16:04:10 +0000 |
commit | 7bdda0dda74c0c2efe835ea9c791a92f0520eb3f (patch) | |
tree | 289ebadc507bf85c6a7a0c6afae67c1da36b28ae | |
parent | 53b90c6fa4afd097cb3168371315d10dd91c4edc (diff) | |
download | common-data-7bdda0dda74c0c2efe835ea9c791a92f0520eb3f.tar common-data-7bdda0dda74c0c2efe835ea9c791a92f0520eb3f.tar.gz common-data-7bdda0dda74c0c2efe835ea9c791a92f0520eb3f.tar.bz2 common-data-7bdda0dda74c0c2efe835ea9c791a92f0520eb3f.tar.xz common-data-7bdda0dda74c0c2efe835ea9c791a92f0520eb3f.zip |
- Fix update-menus script to not output empty line
- Re-add menu file stamp to prevent restarting update-menus for each
graphical login
-rw-r--r-- | desktop-common-data.spec | 10 | ||||
-rwxr-xr-x | menu/update-menus | 8 | ||||
-rwxr-xr-x | xinit.d/menu | 20 |
3 files changed, 29 insertions, 9 deletions
diff --git a/desktop-common-data.spec b/desktop-common-data.spec index efef418..12df02b 100644 --- a/desktop-common-data.spec +++ b/desktop-common-data.spec @@ -3,7 +3,7 @@ Summary: Desktop common files Name: desktop-common-data Version: 2007 -Release: %mkrel 18 +Release: %mkrel 19 License: GPL URL: http://www.mandrivalinux.com/ Group: System/Configuration/Other @@ -115,6 +115,8 @@ mkdir tmp-l10n for i in %_datadir/locale/*/LC_MESSAGES/menu-messages.mo ; do msgunfmt $i > tmp-l10n/`echo $i | sed -e 's|%{_datadir}/locale/||' -e 's|/LC.*||'`.po done + +install -d -m 0755 %buildroot/%_var/lib/menu for i in menu/desktop-directories/*.in ; do %{_bindir}/intltool-merge --desktop-style -c tmp-l10n/cache tmp-l10n $i %buildroot/%_datadir/desktop-directories/`basename $i .in` @@ -177,6 +179,7 @@ rm -fr %buildroot %dir %_sysconfdir/xdg/discovery/menus/applications-merged %config(noreplace) %_sysconfdir/xdg/menus/*.menu %config(noreplace) %_sysconfdir/xdg/discovery/menus/*.menu +%dir %_var/lib/menu # %dir %_datadir/faces/ @@ -212,6 +215,11 @@ rm -fr %buildroot %changelog +* Thu Oct 26 2006 Frederic Crozat <fcrozat@mandriva.com> 2007-19mdv2007.0 +- Fix update-menus script to not output empty line +- Re-add menu file stamp to prevent restarting update-menus for each + graphical login + * Mon Oct 02 2006 Frederic Crozat <fcrozat@mandriva.com> 2007-18mdv2007.0 - Rename root node from Mandriva Linux to Applications (Mdv bug #25389) - Add missing .directory for various entries (Mdv bug #26273) diff --git a/menu/update-menus b/menu/update-menus index 7baeb12..bd21520 100755 --- a/menu/update-menus +++ b/menu/update-menus @@ -38,7 +38,11 @@ export VERBOSE export USER_MENU if [ -d /etc/menu.d ]; then - run-parts $RUN_PARTS_ARG /etc/menu.d - echo + run-parts $RUN_PARTS_ARG /etc/menu.d + if [ "$USER_MENU" = "1" ]; then + touch "$HOME/.menu-updates.stamp" 2> /dev/null + else + touch /var/lib/menu/.menu-updates.stamp 2> /dev/null + fi fi diff --git a/xinit.d/menu b/xinit.d/menu index 5f05376..41b8c99 100755 --- a/xinit.d/menu +++ b/xinit.d/menu @@ -26,19 +26,27 @@ fi touch $HOME/.mdk-menu-migrated fi -USER_STAMP=$HOME/.xdg-menu-updates.stamp -USER_MENU=$HOME/.local/ +USER_STAMP=$HOME/.menu-updates.stamp +SYSTEM_STAMP=/var/lib/menu/.menu-updates.stamp +MENU_DIR=$HOME/.config/menus +APPS_DIR=$HOME/.local/share/applications RETVAL=0 -if [ -d $USER_MENU -o -f $USER_STAMP ]; then - if [ ! -f $USER_STAMP ]; then +if [ \( -d "$MENU_DIR" -o -d "$APP_DIR" \) -o -f "$USER_STAMP" -a -f "$SYSTEM_STAMP" ]; then + if [ ! -f "$USER_STAMP" ]; then + RETVAL=1; + elif [ "$SYSTEM_STAMP" -nt "$USER_STAMP" ]; then + RETVAL=1; + elif [ "$MENU_DIR" -nt "$USER_STAMP" ]; then + RETVAL=1; + elif [ "$APPS_DIR" -nt "$USER_STAMP" ]; then RETVAL=1; fi if [ $RETVAL -eq 1 ]; then - echo -n "Running update-menus..." + echo "Running update-menus..." update-menus -u - echo done + echo "menu generation finished" fi fi |