efl/src/bin/efreet
Carsten Haitzler 125648cc92 efreetd - cache - add more statinfo work around 0 mtime distros
some distros 9notably in this case nixos) want to do reproducible
builds. to them this means going around setting mtime for all files to
0. this means efreetd not only thinks mtime is invalid/stupid (0 is
generally just that as midnight on jan 1 1970 is not exactly a
sensible dare for a modified timestamp of a file as no filesystem with
any sanity will have not been modified since that time), but it keeps
mtime at 0 even when things update. this totally breaks efreetd that
expects to find mtime increases over time as things change. it's
necessary because it has to perform a "are mu caches up to date" scan
of all file data it caches and it needs to know if it should rebuild
something based on this.

so this does a few things:

1. it makes mtime have to be an exact match to the cache, not cache
mtime >= file mtime. so any change forward or back is an inavlidation.
2. it now also uses ctime, mode, size, uid, gid, block count and if a
symlink, the sha1 of the symlink path in addition and any change to
these == invalid.

this adds a lot of code and changes how dirs get scanned a bit but it
means it can pick up changes on these 0 mtime distros.

interestingly the policy of mtime being 0 is to have a reprodcible fs
... but ctime still changes and is > 0, as does inode info, so it's
not actually possible to have it totally work... but they try still,
so this is a fix for that problem.

whilst i was doing thisi also noticed efreetd re-red dirs many times
due to icon theme inhritance. i also fixed that to do a LOT less
syscalls by only scanning a dir once as i was rejigging the scanning
code at the time anyway. this should optimize thr scan costs at
efreetd startup too.

@fix
@opt
2020-06-18 11:18:35 +01:00
..
.gitignore efreet - save about 240-300k or so of memory used by efreet mime 2016-08-23 12:04:06 +09:00
efreet_desktop_cache_create.c efreet - consider ctime changes as changes too 2019-11-16 13:02:10 +00:00
efreet_icon_cache_create.c efreetd - cache - add more statinfo work around 0 mtime distros 2020-06-18 11:18:35 +01:00
efreet_mime_cache_create.c remove Evil.h when not necessary, include evil_private.h when necessary 2019-05-20 09:10:00 -04:00
efreetd.c efreetd: remove a tentative global variable definition 2019-04-04 09:14:08 -04:00
efreetd.h
efreetd_cache.c efreet - look in /usr/local/share/pixmaps too 2020-04-16 13:04:03 +01:00
efreetd_cache.h efreetd: remove a tentative global variable definition 2019-04-04 09:14:08 -04:00
efreetd_ipc.c eina - fix eina_strndup test passing 2020-01-15 19:23:44 +00:00
efreetd_ipc.h efreet - save about 240-300k or so of memory used by efreet mime 2016-08-23 12:04:06 +09:00
meson.build efreet - disable strict as this makes things less functional... 2020-04-16 13:33:37 +01:00