Sometimes updating the SDK with the `update-webkit-flatpak` script fails, e.g., due to a network hiccup, leaving the tree not entirely sound. This could lead to error messages like: Error: While trying to checkout abc06d3ae1d25bc3b8251cfb53fb0d4615b67046729f866eac194d2804addc3a into /home/user/checkout/WebKit/WebKitBuild/UserFlatpak/runtime/org.webkit.Sdk.Debug/x86_64/0.3/.abc06d3ae1d25bc3b8251cfb53fb0d4615b67046729f866eac194d2804addc3a-MC2HW0: Opening content object 4f25c10e283d5d1cc82241b6b0c7d482f13c01696cbd0a33a2086b0e97cae5ac: Couldn't find file object '4f25c10e283d5d1cc82241b6b0c7d482f13c01696cbd0a33a2086b0e97cae5ac' The script could try to run `ostree --repo=WebKitBuild/UserFlatpak/repo/ fsck` before retrying the update. It would help the bots recovering from this issue without manual intervention.
Maybe `flatpak repair` would be better. I dunno what is the difference.
Yes `flatpak repair` does `ostree fsck` plus a bit of extra work on top: According to the code: * Try to repair a flatpak directory: * + Delete any mirror refs which may be leaking disk space * (https://github.com/flatpak/flatpak/issues/3222) * + Scan all locally available refs * + remove ref that don't correspond to a deployed ref * + Verify the commits they point to and all object they reference: * + Remove any invalid objects * + Note any missing objects * + Any refs that had invalid object, or non-partial refs that had missing objects are removed * + prune (depth=0) all object not references by a ref, which gets rid of any possibly invalid non-scanned objects * * Remove leftover .removed contents * + Enumerate all deployed refs: * + if they are not in the repo (or is partial for a non-subdir deploy), re-install them (pull + deploy)
Pull request: https://github.com/WebKit/WebKit/pull/4987
Committed 255142@main (7e710036103c): <https://commits.webkit.org/255142@main> Reviewed commits have been landed. Closing PR #4987 and removing active labels.
<rdar://problem/100776896>