Commit 4054e73
committed
builder-main: Prevent deleting state-dir or its parents with force-clean
Deleting the state dir leaves flatpak-builder in an inconsistent hung
state by default as rofiles-fuse tries to recurse indefinitely when
resolving paths.
```
statx(AT_FDCWD, "/home/bbhtt/test/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/rofiles/rofiles-lLitmd/.flatpak-builder/cache/config", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=67, ...}) = 0
[...]
```
This is reproducible when doing
```
flatpak-builder --state-dir ~/foobar ~/foobar --force-clean MANIFEST
```
or
```
flatpak-builder . --force-clean MANIFEST
```
where state-dir is relative to `.`1 parent 15baba4 commit 4054e73
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
865 | 875 | | |
866 | 876 | | |
867 | 877 | | |
| |||
0 commit comments