Run apt maintainer scripts when restoring cached deps - #57
Merged
Conversation
The arm64 AppImage bundle has failed since the release workflow swapped 'sudo apt install' for awalsh128/cache-apt-pkgs-action. On a cache hit that action only untars package files, so no postinst runs. The arm64 runner image ships no GTK 3 runtime, so libgtk-3-0t64 is restored from the cache and never generates /usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules.cache. linuxdeploy-plugin-gtk copies that file into the AppDir and then sed's it unconditionally, so the plugin aborts and tauri reports the opaque 'failed to run linuxdeploy'. x64 is unaffected because its image preinstalls the configured GTK 3 stack. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The arm64
publish-taurijob has failed on every v26.9.0-stable attempt with a one-line error and no linuxdeploy output:The arm64 job installed the exact same 301 packages in July's successful v26.8.0-stable release, the difference is how. Commit 18cb6d9 replaced
sudo apt installwithawalsh128/cache-apt-pkgs-action, and on a cache hit that action only untars package files: no dpkg registration, no maintainer scripts. The arm64 runner image ships no GTK 3 runtime (x64 preinstalls it), so on arm64libgtk-3-0t64comes from the cache and its postinst never runs:Without it
/usr/lib/aarch64-linux-gnu/gtk-3.0/3.0.0/immodules.cachedoes not exist.linuxdeploy-plugin-gtkcopies the system GTK tree into the AppDir, cannot findgtk-query-immodules-3.0(it looks inlibgtk-3-0, Ubuntu 24.04 ships it underlibgtk-3-0t64), warns, and thensed -is the file it never got, which underset -ekills the plugin. Tauri swallows linuxdeploy's stderr at the default log level, which is why CI only showsfailed to run linuxdeploy.Reproduced on a clean Ubuntu 24.04 host by extracting the same packages file-only, which fails identically:
Running the cached
postinst configureon that same host regeneratesimmodules.cacheand the AppImage then builds (exit 0), so the fix is to let the action run the maintainer scripts it caches:The action runs each script with
|| true, so a script that misbehaves outside its dpkg environment cannot fail the step.Two notes. Adding packages in 008b0a6 changes the cache key, so the next release would have missed the cache, done a real
apt installand passed, then repopulated the cache and failed again on the release after that. Andvalidate-desktop.ymluses the same action but never bundles an AppImage, so it is left alone; only the release path needs the configured GTK stack. Becauserelease.ymlonly triggers on tags, PR CI cannot exercise this change, hence the local reproduction above.