appmenus: call kbuildsycoca4 only once after template update (#886)
This commit is contained in:
parent
04770e4037
commit
a28e6e1044
@ -58,6 +58,6 @@ fi
|
|||||||
echo "--> Adding Apps to the Menu..."
|
echo "--> Adding Apps to the Menu..."
|
||||||
LC_COLLATE=C xdg-desktop-menu install $APPSDIR/*.directory $APPSDIR/*.desktop
|
LC_COLLATE=C xdg-desktop-menu install $APPSDIR/*.directory $APPSDIR/*.desktop
|
||||||
|
|
||||||
if [ -n "$KDE_SESSION_UID" ]; then
|
if [ -n "$KDE_SESSION_UID" -a -z "$SKIP_CACHE_REBUILD" ]; then
|
||||||
kbuildsycoca4
|
kbuildsycoca4
|
||||||
fi
|
fi
|
||||||
|
@ -324,11 +324,15 @@ def main():
|
|||||||
shutil.copy(system_path['appmenu_start_hvm_template'], vm.appmenus_templates_dir)
|
shutil.copy(system_path['appmenu_start_hvm_template'], vm.appmenus_templates_dir)
|
||||||
|
|
||||||
if hasattr(vm, 'appvms'):
|
if hasattr(vm, 'appvms'):
|
||||||
|
os.putenv('SKIP_CACHE_REBUILD', '1')
|
||||||
for child_vm in vm.appvms.values():
|
for child_vm in vm.appvms.values():
|
||||||
try:
|
try:
|
||||||
child_vm.appmenus_recreate()
|
child_vm.appmenus_recreate()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print >> sys.stderr, "---> Failed to recreate appmenus for " \
|
print >> sys.stderr, "---> Failed to recreate appmenus for " \
|
||||||
"'{0}': {1}".format(child_vm.name, str(e))
|
"'{0}': {1}".format(child_vm.name, str(e))
|
||||||
|
if 'KDE_SESSION_UID' in os.environ:
|
||||||
|
subprocess.call(['kbuildsycoca4'])
|
||||||
|
os.unsetenv('SKIP_CACHE_REBUILD')
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
Loading…
Reference in New Issue
Block a user