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..."
|
||||
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
|
||||
fi
|
||||
|
@ -324,11 +324,15 @@ def main():
|
||||
shutil.copy(system_path['appmenu_start_hvm_template'], vm.appmenus_templates_dir)
|
||||
|
||||
if hasattr(vm, 'appvms'):
|
||||
os.putenv('SKIP_CACHE_REBUILD', '1')
|
||||
for child_vm in vm.appvms.values():
|
||||
try:
|
||||
child_vm.appmenus_recreate()
|
||||
except Exception, e:
|
||||
print >> sys.stderr, "---> Failed to recreate appmenus for " \
|
||||
"'{0}': {1}".format(child_vm.name, str(e))
|
||||
if 'KDE_SESSION_UID' in os.environ:
|
||||
subprocess.call(['kbuildsycoca4'])
|
||||
os.unsetenv('SKIP_CACHE_REBUILD')
|
||||
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user