sysupdate: introduce "installdb" that keeps track of installed resources

Let's make sure we keep track of any file we drop into the system via a
database in /var/. This database is implemented based on symlinks, i.e.
reuses the fs as a simple database. Given the database most likely will
have <= 10 entries only (as we store *patterns* of installed file paths in
them, not the file paths themselves), this should be very efficient.

For implementation details see comments at top of
src/sysupdate/sysupdate-cleanup.c.
This commit is contained in:
Lennart Poettering
2026-06-22 14:44:51 +02:00
parent 39ff56374c
commit d82e256bb9
7 changed files with 665 additions and 51 deletions
+3
View File
@@ -35,6 +35,7 @@
#include "strv.h"
#include "sync-util.h"
#include "sysupdate.h"
#include "sysupdate-cleanup.h"
#include "sysupdate-feature.h"
#include "sysupdate-instance.h"
#include "sysupdate-pattern.h"
@@ -1672,6 +1673,8 @@ int transfer_install_instance(
resource_type_to_string(t->target.type));
t->temporary_pending_path = mfree(t->temporary_pending_path);
(void) context_installdb_record(t->context, t->target.path, t->target.patterns);
}
if (t->final_partition_label) {