Skip to content

Move locale migration after cleanup#592

Merged
bbhtt merged 2 commits intoflatpak:mainfrom
chrisawi:locale-cleanup
Mar 10, 2026
Merged

Move locale migration after cleanup#592
bbhtt merged 2 commits intoflatpak:mainfrom
chrisawi:locale-cleanup

Conversation

@chrisawi
Copy link
Contributor

@chrisawi chrisawi commented Mar 2, 2024

Otherwise, module-level cleanup can remove locale symlinks that point to locale data installed by other modules.

Closes #154

I've tested this building an app, and for that at least, it seems to work. I haven't tried building a runtime though. There are two other calls to builder_migrate_locale_dirs() that I haven't really investigated. One happens in init for all runtimes, and the other applies only to platforms.

@TingPing
Copy link
Member

TingPing commented Mar 3, 2024

@bbhtt bbhtt added this to the 1.5.0 milestone Mar 9, 2026
@bbhtt
Copy link
Contributor

bbhtt commented Mar 10, 2026

The other two calls should be unaffected by the bug.

The first one happens when build-runtime: true and init runs. That's already before any module have been built and just sets up the locale dir structure for the runtime pre-build.

The next call happens when creating the platform-base which is already after cleanup phase has run

if (!builder_manifest_cleanup (manifest, cache, build_context, &error))
{
g_printerr ("Error: %s\n", error->message);
return 1;
}
if (!builder_manifest_finish (manifest, cache, build_context, &error))
{
g_printerr ("Error: %s\n", error->message);
return 1;
}
if (!builder_manifest_create_platform (manifest, cache, build_context, &error))
{
g_printerr ("Error: %s\n", error->message);
return 1;
}

@bbhtt bbhtt marked this pull request as ready for review March 10, 2026 11:05
chrisawi and others added 2 commits March 10, 2026 18:27
Otherwise, module-level cleanup can remove locale symlinks that point to
locale data installed by other modules.

Closes flatpak#154
@bbhtt bbhtt merged commit 9c4e3ea into flatpak:main Mar 10, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strange behaviour when cleaning up "/share/locale"

4 participants