chore: disable mime db creation in snap (#232129)

pull/232132/head
Robo 2024-10-24 19:39:28 +09:00 committed by GitHub
parent e1de28e4ee
commit 4e7b53c5a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 8 deletions

View File

@ -167,16 +167,17 @@ fi
# Keep an array of data dirs, for looping through them
IFS=':' read -r -a data_dirs_array <<< "$XDG_DATA_DIRS"
# Build mime.cache
# needed for gtk and qt icon
# Build mime.cache needed for gtk and qt icon
# TODO(deepak1556): Re-enable this once we move to core22
# Refs https://github.com/microsoft/vscode/issues/230454#issuecomment-2418352959
if [ "$needs_update" = true ]; then
rm -rf "$XDG_DATA_HOME/mime"
if [ ! -f "$SNAP/usr/share/mime/mime.cache" ]; then
if command -v $SNAP/usr/bin/update-mime-database >/dev/null; then
cp --preserve=timestamps -dR "$SNAP/usr/share/mime" "$XDG_DATA_HOME"
async_exec $SNAP/usr/bin/update-mime-database "$XDG_DATA_HOME/mime"
fi
fi
# if [ ! -f "$SNAP/usr/share/mime/mime.cache" ]; then
# if command -v $SNAP/usr/bin/update-mime-database >/dev/null; then
# cp --preserve=timestamps -dR "$SNAP/usr/share/mime" "$XDG_DATA_HOME"
# async_exec $SNAP/usr/bin/update-mime-database "$XDG_DATA_HOME/mime"
# fi
# fi
fi
# Gio modules and cache (including gsettings module)