<p></p>
<p dir="auto">With DESTDIR set, the <code>post_install()</code> commands do not get run, because they are undesirable (they create cache files which conflict with the installed system).</p>
<p dir="auto">With DESTDIR <em><strong>not</strong></em> 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.</p>
<p dir="auto">So you definitely want to run it. Before the Meson function got added, many projects would copy around a mostly identical <code>post_install.py</code> script which exited early <code>if 'DESTDIR' in os.environ</code>, and then ran each applicable post-installation command.</p>
<p dir="auto">You can either do that, or only support interactive user installations on Meson 0.57 by hiding that <code>post_install()</code> behind a meson version check:</p>
<div class="highlight highlight-source-meson"><pre><span class="pl-k">if</span> <span class="pl-c1">meson</span>.version().version_compare(<span class="pl-s"><span class="pl-pds">'</span>>=0.57.0<span class="pl-pds">'</span></span>)
    gnome_mod.post_install(<span class="pl-smi">gtk_update_icon_cache</span>: <span class="pl-c1">true</span>)
<span class="pl-k">else</span>
    <span class="pl-c1">warning</span>(<span class="pl-s"><span class="pl-pds">'</span>too old version of meson detected, you may need to run `gtk-update-icon-cache` yourself after installing<span class="pl-pds">'</span></span>)
    <span class="pl-c"># checking a deprecated script into git was opted against</span>
    <span class="pl-c"># meson.add_install_script('scripts/post_install.py')</span>
<span class="pl-k">endif</span></pre></div>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2761#issuecomment-1046137818">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ5YWQHNTS6EABOPCXLU4A7HJANCNFSM4ZDZAFLA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJZ6S5GDLKI3GDTTUN3U4A7HJA5CNFSM4ZDZAFLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHZNMXWQ.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/pull/2761/c1046137818</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2761#issuecomment-1046137818",
"url": "https://github.com/geany/geany/pull/2761#issuecomment-1046137818",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>