Skip to content

builder-utils: Rewrite locale migration to use fd-based traversal#733

Draft
bbhtt wants to merge 3 commits into
mainfrom
bbhtt/locale
Draft

builder-utils: Rewrite locale migration to use fd-based traversal#733
bbhtt wants to merge 3 commits into
mainfrom
bbhtt/locale

Conversation

@bbhtt
Copy link
Copy Markdown
Contributor

@bbhtt bbhtt commented Apr 11, 2026

No description provided.

@bbhtt bbhtt marked this pull request as draft April 11, 2026 03:07
Comment thread src/builder-utils.c Outdated
@bbhtt bbhtt added this to the 1.5.x milestone May 28, 2026
@bbhtt bbhtt force-pushed the bbhtt/locale branch 2 times, most recently from aec8533 to ab2b90c Compare May 30, 2026 04:20
@bbhtt bbhtt force-pushed the bbhtt/locale branch 5 times, most recently from dd96137 to 5dffdab Compare May 31, 2026 04:24
@bbhtt
Copy link
Copy Markdown
Contributor Author

bbhtt commented May 31, 2026

I still need to test this and find more examples of how locale directories are structured by apps.

The previous code was recursively copying everything inside the localedir which isn't possible to do when this is fd based. I don't think we can support the exact same behaviour.

I managed to support the gettext localedir structure and the when locale files are inside the immediate locale directory. AppStream also mainly handles these two structures too. I don't think other structures exists but who knows what some random software buildsystem is doing.

If it can't be fully emptied, it cannot be removed or symlinked, then it gets left in a weird state and errors from unlinkat or symlinkat cannot sanely be ignored too.

@bbhtt
Copy link
Copy Markdown
Contributor Author

bbhtt commented May 31, 2026

Ok maybe this is closer to the previous behaviour, did something to recursively migrate things.

@bbhtt
Copy link
Copy Markdown
Contributor Author

bbhtt commented May 31, 2026

Needs a rebase over other PRs, but I think it's ok now, minus me testing it some more.

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.

2 participants