Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils: Refactoring #5416

Merged
merged 8 commits into from Jul 3, 2023
Merged

utils: Refactoring #5416

merged 8 commits into from Jul 3, 2023

Conversation

smcv
Copy link
Collaborator

@smcv smcv commented May 17, 2023

Various smaller refactors in preparation for #5409.

  • common: Move declaration of get_compat_arch_reverse back to -utils

    The implementation never actually moved to -ref-utils.

  • common: Move flatpak_abs_usrmerged_dirs to FlatpakExports

    This will help to break circular dependencies between FlatpakExports
    and flatpak-run.

  • common: Move flatpak_is_app_runtime_or_appstream_ref to ref-utils

    This matches where it was declared.

  • common: Remove unused functions

  • common: Stop including utils-http in utils

    utils-http is conceptually larger than utils.

  • common: Explicitly include context's own header

    Previously we were relying on flatpak-utils-private.h having a circular
    dependency on this, but I'm intending to remove that during future
    refactoring.

  • common: Move metadata to its own header

    This cuts more circular dependencies between flatpak-run and
    flatpak-exports.

  • common: Break circular dependency between context and dir/run

    By giving the context a bit more knowledge of which directories Flatpak
    uses for what, we can stop it from depending on the dir/run modules,
    which themselves depend on FlatpakContext.

@smcv smcv marked this pull request as ready for review May 17, 2023 12:19
smcv added 8 commits July 3, 2023 19:52
The implementation never actually moved to -ref-utils.

Signed-off-by: Simon McVittie <[email protected]>
This will help to break circular dependencies between FlatpakExports
and flatpak-run.

Signed-off-by: Simon McVittie <[email protected]>
This matches where it was declared.

Signed-off-by: Simon McVittie <[email protected]>
utils-http is conceptually larger than utils.

Signed-off-by: Simon McVittie <[email protected]>
Previously we were relying on flatpak-utils-private.h having a circular
dependency on this, but I'm intending to remove that during future
refactoring.

Signed-off-by: Simon McVittie <[email protected]>
This cuts more circular dependencies between flatpak-run and
flatpak-exports.

Signed-off-by: Simon McVittie <[email protected]>
By giving the context a bit more knowledge of which directories Flatpak
uses for what, we can stop it from depending on the dir/run modules,
which themselves depend on FlatpakContext.

Signed-off-by: Simon McVittie <[email protected]>
@alexlarsson alexlarsson merged commit 36bc1bd into flatpak:main Jul 3, 2023
9 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.

None yet

2 participants