appmenus: call appropriate kbuildsycoca version (KDE4/KDE5)

QubesOS/qubes-issues#1807
This commit is contained in:
Marek Marczykowski-Górecki 2016-05-04 01:44:09 +02:00
parent c9d1f7c98d
commit b5101d11d6
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
3 changed files with 3 additions and 3 deletions

View File

@ -60,5 +60,5 @@ LC_COLLATE=C xdg-desktop-menu install --noupdate $APPSDIR/*.directory $APPSDIR/*
if [ -n "$KDE_SESSION_UID" -a -z "$SKIP_CACHE_REBUILD" ]; then if [ -n "$KDE_SESSION_UID" -a -z "$SKIP_CACHE_REBUILD" ]; then
xdg-desktop-menu forceupdate xdg-desktop-menu forceupdate
kbuildsycoca4 kbuildsycoca$KDE_SESSION_VERSION
fi fi

View File

@ -382,7 +382,7 @@ def main():
"'{0}': {1}".format(child_vm.name, str(e)) "'{0}': {1}".format(child_vm.name, str(e))
subprocess.call(['xdg-desktop-menu', 'forceupdate']) subprocess.call(['xdg-desktop-menu', 'forceupdate'])
if 'KDE_SESSION_UID' in os.environ: if 'KDE_SESSION_UID' in os.environ:
subprocess.call(['kbuildsycoca4']) subprocess.call(['kbuildsycoca' + os.environ.get('KDE_SESSION_VERSION', '4')])
os.unsetenv('SKIP_CACHE_REBUILD') os.unsetenv('SKIP_CACHE_REBUILD')

View File

@ -19,5 +19,5 @@ if ls $APPSDIR/*.directory $APPSDIR/*.desktop > /dev/null 2>&1; then
fi fi
if [ -n "$KDE_SESSION_UID" -a -z "$SKIP_CACHE_REBUILD" ]; then if [ -n "$KDE_SESSION_UID" -a -z "$SKIP_CACHE_REBUILD" ]; then
kbuildsycoca4 kbuildsycoca$KDE_SESSION_VERSION
fi fi