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

Improve handling of a symlinked application directory #557

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jul 23, 2023

  1. Do not remove the target directory on --force-clean; only clear it

    If `--force-clean` is passed, clear (remove the contents of) the target (app)
    directory without deleting the directory itself.
    
    This is useful if the app directory is a symlink, e. g. to a faster disk or a
    scratch location.
    
    Submodule subprojects/libglnx 07e3e49d..1a503dcc:
      > shutil: add glnx_shutil_rm_rf_children_at()
      > shutil: specify symlink behavior of glnx_shutil_rm_rf_at(), add tests
      > tests: add a macro to check for positive errno
    intelfx committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    8cb06cd View commit details
    Browse the repository at this point in the history
  2. Fix same-filesystem check on the state and app directories

    We only care about the app (== target) directory, not its parent.
    
    This breaks if the target directory is a symlink, like this:
    
    ```
    $ pwd
    /path/to/code
    
    $ realpath state
    /path/to/scratch/state
    
    $ realpath build
    /path/to/scratch/target
    
    $ flatpak-builder --state-dir=state build org.some.App.yaml
    The state dir (/path/to/scratch/state) is not on the same filesystem as the target dir (/path/to/code)
    ```
    intelfx committed Jul 23, 2023
    Configuration menu
    Copy the full SHA
    471ebad View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    15cfe11 View commit details
    Browse the repository at this point in the history