[Github-comments] [geany/geany] WIP: Meson build system (#2761)

Eli Schwartz notifications at xxxxx
Sun Feb 20 01:25:08 UTC 2022


With DESTDIR set, the `post_install()` commands do not get run, because they are undesirable (they create cache files which conflict with the installed system).

With DESTDIR ***not*** set, some cache files do not get created, with the consequence that as far as the programs reading and relying on the cache are concerned, those icons don't exist. At least on first installation -- the index IIRC mostly contains the names of each available icon and what sizes they are available for. So applications that need those icons still have to read them, but the cache file means that one (mmapped) file is the only file that needs to be read from disk to known whether an icon is available, and where, across 16 different sizes and 13 different categories.

So you definitely want to run it. Before the Meson function got added, many projects would copy around a mostly identical `post_install.py` script which exited early `if 'DESTDIR' in os.environ`, and then ran each applicable post-installation command.

You can either do that, or only support interactive user installations on Meson 0.57 by hiding that `post_install()` behind a meson version check:

```meson
if meson.version().version_compare('>=0.57.0')
    gnome_mod.post_install(gtk_update_icon_cache: true)
else
    warning('too old version of meson detected, you may need to run `gtk-update-icon-cache` yourself after installing')
    # checking a deprecated script into git was opted against
    # meson.add_install_script('scripts/post_install.py')
endif
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2761#issuecomment-1046137818
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/2761/c1046137818 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220219/90822d91/attachment.htm>


More information about the Github-comments mailing list