Skip to content

Commit 7c49f5d

Browse files
chrisawibbhtt
authored andcommitted
builder-manifest: Run 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 5fff033 commit 7c49f5d

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
@@ -2783,6 +2783,22 @@ builder_manifest_cleanup (BuilderManifest *self,
27832783
}
27842784
}
27852785

2786+
if (builder_context_get_separate_locales (context))
2787+
{
2788+
g_autoptr(GFile) root_dir = NULL;
2789+
2790+
if (builder_context_get_build_runtime (context))
2791+
root_dir = g_file_get_child (app_dir, "usr");
2792+
else
2793+
root_dir = g_file_get_child (app_dir, "files");
2794+
2795+
if (!builder_migrate_locale_dirs (root_dir, error))
2796+
{
2797+
g_prefix_error (error, "Can't migrate locale dirs: ");
2798+
return FALSE;
2799+
}
2800+
}
2801+
27862802
app_root = g_file_get_child (app_dir, "files");
27872803

27882804
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
@@ -2178,22 +2178,6 @@ builder_module_build_helper (BuilderModule *self,
21782178
return FALSE;
21792179
}
21802180

2181-
if (builder_context_get_separate_locales (context))
2182-
{
2183-
g_autoptr(GFile) root_dir = NULL;
2184-
2185-
if (builder_context_get_build_runtime (context))
2186-
root_dir = g_file_get_child (app_dir, "usr");
2187-
else
2188-
root_dir = g_file_get_child (app_dir, "files");
2189-
2190-
if (!builder_migrate_locale_dirs (root_dir, error))
2191-
{
2192-
g_prefix_error (error, "module %s: ", self->name);
2193-
return FALSE;
2194-
}
2195-
}
2196-
21972181
if (!builder_module_install_licenses (self, id, source_dir, app_dir, error))
21982182
return FALSE;
21992183

0 commit comments

Comments
 (0)