On stateless systems like ostree, the appstream cache needs to be rebuilt at runtime after system updates. The way we've typically handled these things at Endless is to add a systemd service that uses the ConditionNeedsUpdate option. That way it runs during boot after an update but not at other times. This would allow us to ship appstream data in the OS at /usr/share/app-info.
You can see an example of this type of unit in systemd. For systems that make use of the /{etc,var}/.updated scheme, this rebuilds the linker cache after an update. On classic stateful systems that don't use that scheme, the unit never runs as it's expected other process take care of updating the linker cache. For example, dpkg or rpm post scripts.
Anyways, I think the unit would essentially be this:
On stateless systems like ostree, the appstream cache needs to be rebuilt at runtime after system updates. The way we've typically handled these things at Endless is to add a systemd service that uses the
ConditionNeedsUpdateoption. That way it runs during boot after an update but not at other times. This would allow us to ship appstream data in the OS at/usr/share/app-info.You can see an example of this type of unit in systemd. For systems that make use of the
/{etc,var}/.updatedscheme, this rebuilds the linker cache after an update. On classic stateful systems that don't use that scheme, the unit never runs as it's expected other process take care of updating the linker cache. For example, dpkg or rpm post scripts.Anyways, I think the unit would essentially be this:
Does that seem like something that would be acceptable here? I can put together a PR if so.
The text was updated successfully, but these errors were encountered: