Re: [Feature request] Support b4 prerequisite-patch-id dependencies when applying patchsets

Roman Gushchin <[email protected]>
Newsgroups dev.linux.lists.sashiko
Message-ID <[email protected]>
[email protected] writes:

> Hi,
>
> I ran into a Failed To Apply result in Sashiko for a kernel patch series that uses b4 prerequisite dependencies.
>
> Affected Sashiko patchset:
> https://sashiko.dev/#/patchset/20260812-submit-qcom-smbx-send-v1-v2-0-f504b8f9bfad%40snyders.xyz
>
> Lore thread:
> https://lore.kernel.org/r/[email protected]/
>
> The series is based on:
>
> base-commit: 99b38cda3f4c486cfbc40f3c8ede1703594e9f13
>
> and declares five prerequisite patches using b4 dependency metadata:
>
> prerequisite-patch-id: 3d8a9cf43b5e5eac64a60aeec5e9c90880bcf792
> prerequisite-patch-id: de3e3b494f9644596cfa4cafc362ca0b48288c45
> prerequisite-patch-id: d5e22a0fe7cd55374f60d7c2cb14ed3df8f94e0b
> prerequisite-patch-id: 9eafa41402e97d6a3e5369bec46df4e9db3d2af6
> prerequisite-patch-id: 5638b901cd10773fa9485605f84b25a1dd826a84
>
> Those five prerequisites are the preceding qcom_smbx fixes series:
> https://lore.kernel.org/r/[email protected]/
>
> The SMB5 v2 series intentionally depends on that fixes series because
> both modify overlapping areas of
> drivers/power/supply/qcom_smbx.c. Applying the v2 directly to the base
> tree without first applying the declared prerequisites is therefore
> expected to fail.
>
> On the Sashiko page, the result is Failed To Apply, Baseline shows
> Selected: -, and no AI review is run. From looking at the current
> baseline/application logic, it appears Sashiko applies the patches in
> the current patchset to a candidate baseline but does not resolve and
> apply b4 prerequisite-patch-id dependencies first.
>
> Expected behaviour would be roughly:
>
> Resolve the base commit.
> Resolve each prerequisite-patch-id from public-inbox/Lore.
> Apply the prerequisite patches in dependency order.
> Apply the patchset being reviewed.
> Run the normal review on the resulting tree.
>
> b4 itself supports this dependency metadata, and b4 prep --check-deps can validate that the dependency chain is available and applicable.
>
> If automatically resolving prerequisite-patch-id is intentionally out
> of scope, it would still be useful for Failed To Apply to report that
> unresolved prerequisite metadata was present, rather than making the
> failure look like the submitted series itself does not apply.
>
> Please let me know if you would like any additional reproduction
> details or the exact b4 commands used to prepare the series.

b4 support is in progress:
https://github.com/sashiko-dev/sashiko/pull/389

Thanks
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.