Skip to content

Commit 5860dd3

Browse files
committed
Move locale migration after cleanup
Otherwise, module-level cleanup can remove locale symlinks that point to locale data installed by other modules. Closes #154
1 parent 8c036e0 commit 5860dd3

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

src/builder-manifest.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,6 +2761,22 @@ builder_manifest_cleanup (BuilderManifest *self,
27612761
}
27622762
}
27632763

2764+
if (builder_context_get_separate_locales (context))
2765+
{
2766+
g_autoptr(GFile) root_dir = NULL;
2767+
2768+
if (builder_context_get_build_runtime (context))
2769+
root_dir = g_file_get_child (app_dir, "usr");
2770+
else
2771+
root_dir = g_file_get_child (app_dir, "files");
2772+
2773+
if (!builder_migrate_locale_dirs (root_dir, error))
2774+
{
2775+
g_prefix_error (error, "Can't migrate locale dirs: ");
2776+
return FALSE;
2777+
}
2778+
}
2779+
27642780
app_root = g_file_get_child (app_dir, "files");
27652781

27662782
appdata_source = builder_manifest_find_appdata_file (self, app_root);

src/builder-module.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,22 +1916,6 @@ builder_module_build_helper (BuilderModule *self,
19161916

19171917
builder_set_term_title (_("Post-Install %s"), self->name);
19181918

1919-
if (builder_context_get_separate_locales (context))
1920-
{
1921-
g_autoptr(GFile) root_dir = NULL;
1922-
1923-
if (builder_context_get_build_runtime (context))
1924-
root_dir = g_file_get_child (app_dir, "usr");
1925-
else
1926-
root_dir = g_file_get_child (app_dir, "files");
1927-
1928-
if (!builder_migrate_locale_dirs (root_dir, error))
1929-
{
1930-
g_prefix_error (error, "module %s: ", self->name);
1931-
return FALSE;
1932-
}
1933-
}
1934-
19351919
if (self->post_install)
19361920
{
19371921
for (i = 0; self->post_install[i] != NULL; i++)

0 commit comments

Comments
 (0)