appmenus: defer menu cache regeneration to speedup qvm-sync-appmenus
Call "xdg-desktop-menu forceupdate" at the end of the process, not for every single item.
This commit is contained in:
parent
5e3fbb1623
commit
cc7075ab65
@ -56,8 +56,9 @@ if [ "$SRCDIR" != "none" ]; then
|
||||
fi
|
||||
|
||||
echo "--> Adding Apps to the Menu..."
|
||||
LC_COLLATE=C xdg-desktop-menu install $APPSDIR/*.directory $APPSDIR/*.desktop
|
||||
LC_COLLATE=C xdg-desktop-menu install --noupdate $APPSDIR/*.directory $APPSDIR/*.desktop
|
||||
|
||||
if [ -n "$KDE_SESSION_UID" -a -z "$SKIP_CACHE_REBUILD" ]; then
|
||||
xdg-desktop-menu forceupdate
|
||||
kbuildsycoca4
|
||||
fi
|
||||
|
@ -366,6 +366,7 @@ def main():
|
||||
except Exception, e:
|
||||
print >> sys.stderr, "---> Failed to recreate appmenus for " \
|
||||
"'{0}': {1}".format(child_vm.name, str(e))
|
||||
subprocess.call(['xdg-desktop-menu', 'forceupdate'])
|
||||
if 'KDE_SESSION_UID' in os.environ:
|
||||
subprocess.call(['kbuildsycoca4'])
|
||||
os.unsetenv('SKIP_CACHE_REBUILD')
|
||||
|
Loading…
Reference in New Issue
Block a user