[gedit/master-msvc: 8/10] post install: Don't fail if update-desktop-database failed




commit a57ce6a58911284435d8c79c6c3c5703ac8855af
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Oct 13 21:37:03 2021 +0800

    post install: Don't fail if update-desktop-database failed
    
    For Windows, this program may not exist, so don't fail if this cannot be
    found.

 build-aux/meson/post_install.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/build-aux/meson/post_install.py b/build-aux/meson/post_install.py
index 15b7838bb..02d49f1a1 100755
--- a/build-aux/meson/post_install.py
+++ b/build-aux/meson/post_install.py
@@ -18,8 +18,11 @@ if 'DESTDIR' not in os.environ:
                      os.path.join(datadir, 'icons', 'hicolor')])
 
     print('Updating desktop database...')
-    subprocess.call(['update-desktop-database', '-q',
-                     os.path.join(datadir, 'applications')])
+    try:
+        subprocess.call(['update-desktop-database', '-q',
+                         os.path.join(datadir, 'applications')])
+    except FileNotFoundError:
+        pass
 
     print('Compiling python modules...')
     subprocess.call([sys.executable, '-m', 'compileall', '-f', '-q',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]